-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Menubar] Adds keyboard behaviors to the menubar, improves accessibility #3320
Open
tespin
wants to merge
82
commits into
processing:develop
Choose a base branch
from
tespin:refactor/menubar-a11y-keyboard-mouse
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Menubar] Adds keyboard behaviors to the menubar, improves accessibility #3320
tespin
wants to merge
82
commits into
processing:develop
from
tespin:refactor/menubar-a11y-keyboard-mouse
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 tasks
tespin
commented
Jan 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Extract logo to header level for better semantic structure
- Ensure arrow keys only cycle through menu items, excluding the logo
…w on an unopened submenu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2933
Just setting this up to track next steps for the component! This PR focuses on adding proper keyboard behaviors to the recently refactored Menubar. Currently in progress
Update
The Menubar component now has keyboard navigation and enhanced accessibility support. There are some other improvements to make which are listed at the end, but I'll implement them in future PRs seeing as this one has gotten rather large.
Before:
Navigation happened purely through Tab / Shift + Tab. Escape functionality worked but otherwise behaviors were not intuitive or accessible. Focus is not tied to state.
old_menubar_2.mov
After:
Most keyboard behaviors from the WAI ARIA authoring guide implemented. Tab behavior works as expected and initial focus styles are available.
menubar_test.mov
Key Changes
Menubar.jsx
for focus managementaria-orientation='horizontal'
onMenubar
and aria-labels where applicableMenubar
innav
elementdiv
-based menubar toul/li
Logo
is moved outside of thenav
,UserMenu
is back inul
elements withrole=group
SubmenuContext
for managing submenu stateMenubarSubmenu
supportslistbox
aria roles, such as with the options inLanguageMenu
To Do
menuItems
andmenuItemToId
could probably be combined into a better data structureuseReducer
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123