Keyboard accessibility of the main nav menu: focus and order #12022
Labels
idle
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Summary
When navigated via keyboard, the main nav’s focus order is not visual and breaks the expectations: not so bad on desktop, much worse on mobile. On mobile, the user menu is not even reachable.
URL
https://developer.mozilla.org/en-US/
Reproduction steps
Expected behavior
Actual behavior
Device
Desktop
Browser
Chrome
Browser version
Stable
Operating system
Android
Screenshot
In every case, I tab through the opened menu and back. On mobile, I also press space on focused elements to open them.
mobile.mov
desktop.mov
Anything else?
I’d suggest using two different markup structures for desktop and mobile views and
display: none
one of them depending on the viewport size. Until we have thereading-flow
property, the DOM order is the king for the keyboard navigation. You can also listen tomatchMedia
when the viewport changes and reorder DOM but it’s not a good idea.Validations
The text was updated successfully, but these errors were encountered: