Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARIA role to sidebar toggle in Rustdoc #82584

Merged
merged 1 commit into from
Feb 28, 2021
Merged

Conversation

tazjin
Copy link
Contributor

@tazjin tazjin commented Feb 27, 2021

This indicates that the div is an interactive element, and makes the sidebar toggle "clickable" in assistive technologies.

Example of Vimium after this change has been applied (see the issue mentioned below for a screenshot of before):

Screenshot of Vimium link hints on a Rustdoc page, indicating that the sidebar toggle is clickable

Fixes #82582

This indicates that the div is an interactive element, and makes the
sidebar toggle "clickable" in assistive technologies.

Fixes rust-lang#82582
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jyn514 (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2021
@GuillaumeGomez GuillaumeGomez added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 27, 2021
@GuillaumeGomez
Copy link
Member

I'm very curious about something: normally this button only appears on mobile devices where the width is too little. What resolution are you using?

@GuillaumeGomez
Copy link
Member

Well, in any case let's get it in (still curious though!). Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Feb 27, 2021

📌 Commit e026e18 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2021
@tazjin
Copy link
Contributor Author

tazjin commented Feb 27, 2021

Thanks for the quick review!

I'm very curious about something: normally this button only appears on mobile devices where the width is too little.

I'm on a standard 1080p resolution (13" laptop screen), however I use a tiling WM with split screen views because I avoid mouse usage due to RSI issues. This way I can have the docs on one half of the screen, and my code on the other. In practice this means that the width of the rendered docs will be <=960px, and it's reasonable that the sidebar would be collapsed at that point :-)

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Feb 27, 2021

Normally it's under 701px that the sidebar enters the "mobile mode". You need more space. ;)

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 27, 2021
Add ARIA role to sidebar toggle in Rustdoc

This indicates that the div is an interactive element, and makes the sidebar toggle "clickable" in assistive technologies.

Example of Vimium after this change has been applied (see the issue mentioned below for a screenshot of before):

![Screenshot of Vimium link hints on a Rustdoc page, indicating that the sidebar toggle is clickable](https://user-images.githubusercontent.com/1552853/109384961-ff935400-78f8-11eb-8199-1d35181aeff0.png)

Fixes rust-lang#82582
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 28, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#81856 (Suggest character encoding is incorrect when encountering random null bytes)
 - rust-lang#82395 (Add missing "see its documentation for more" stdio)
 - rust-lang#82401 (Remove a redundant macro)
 - rust-lang#82498 (Use log level to control partitioning debug output)
 - rust-lang#82534 (Link crtbegin/crtend on musl to terminate .eh_frame)
 - rust-lang#82537 (Update measureme dependency to the latest version)
 - rust-lang#82561 (doc: cube root, not cubic root)
 - rust-lang#82563 (Fix intra-doc handling of `Self` in enum)
 - rust-lang#82584 (Add ARIA role to sidebar toggle in Rustdoc)
 - rust-lang#82596 (clarify RW lock's priority gotcha)
 - rust-lang#82607 (Add a getter for Frame.loc)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a70be0b into rust-lang:master Feb 28, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 28, 2021
@tazjin tazjin deleted the rustdoc-aria branch February 28, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc: Sidebar toggle is not accessible
6 participants