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

rustdoc sidebar is not accessible from keyboard on small screens #87172

Closed
notriddle opened this issue Jul 15, 2021 · 0 comments · Fixed by #87180
Closed

rustdoc sidebar is not accessible from keyboard on small screens #87172

notriddle opened this issue Jul 15, 2021 · 0 comments · Fixed by #87180
Assignees
Labels
A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@notriddle
Copy link
Contributor

notriddle commented Jul 15, 2021

On a PC (or on an iPad with "Full Keyboard Access" turned on), shrink the browser so that the sidebar goes into the overflow menu, then try to get at it with a keyboard.

There's no focus ring. You can actually get keyboard focus on it, in iPadOS, but you can't see it, and I can't seem to get keyboard access to it at all on desktop Firefox. In either case, it's not good enough. The hamburger button is never highlighted, because it is not keyboard focusable (it's a DIV, and not a real button). #87167 won't make this better, since if you are using the keyboard, but are not using a screenreader, the menu items will become focused but you won't be able to see them.

To combine this with #87167, JavaScript can be used to make sidebar visibility get automatically switched based on focus (if a menu item is focused, make it visible, and if the focus goes onto something outside the menu, hide it).

@notriddle notriddle added the C-bug Category: This is a bug. label Jul 15, 2021
@GuillaumeGomez GuillaumeGomez added A-rustdoc-js Area: Rustdoc's JS front-end 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 Jul 16, 2021
@GuillaumeGomez GuillaumeGomez self-assigned this Jul 16, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jul 16, 2021
…d-mobile, r=GuillaumeGomez

feat(rustdoc): open sidebar menu when links inside it are focused

Fixes rust-lang#87172

Based on rust-lang#87167 (which should be merged first)

r? `@GuillaumeGomez`

Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jul 16, 2021
…d-mobile, r=GuillaumeGomez

feat(rustdoc): open sidebar menu when links inside it are focused

Fixes rust-lang#87172

Based on rust-lang#87167 (which should be merged first)

r? ``@GuillaumeGomez``

Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
@bors bors closed this as completed in 0ea2980 Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants