-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
refactor: improve a11y of dropdown menu #6971
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6971--docusaurus-2.netlify.app/ |
Size Change: +33 B (0%) Total Size: 805 kB
ℹ️ View Unchanged
|
🤷♂️ I don't really notice a difference compared to before feel free to self merge if you think it improves, I'm not a11y skilled enough to be sure |
The |
I vaguely remember that dropdowns were purposefully made not able to be tabbed through. Users can quickly tab through the navbar without being trapped in any of the long dropdowns. They can still use Enter to open the dropdown first, and then tab through it. I think we just need to make that more explicit through some aria label. |
On the preview, I don't enter the dropdown with tab
Can't be sure which keys you press on that Gif 🤷♂️ when only using tabs on the preview, I don't see the behavior in this Gif |
It's simple: |
Ah yeah, misunderstood what this PR does. It would focus the |
Trouble is now when navigating from last item in a dropdown menu, the focus goes to a next navbar item, but if it is a another dropdown, the focus will not be visible. |
Ah, I see. Makes sense |
LGTM 👍 |
Motivation
Better identification of dropdown menus for screen readers and slightly improvement of UX when navigating from the keyboard on navbar menu items from dropdown items.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Related PRs