-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ContextualMenu: focused div when menu is opened now has role = "menu" #17683
Conversation
Asset size changes
Over Tolerance (1024 B) Over Baseline Below Baseline New Removed 1 kB = 1000 B Baseline commit: 8d233d903ed4622fa6537bb300f90f740cfd52b7 (build) |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7605487:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Perf comparison
Perf tests with no regressions
|
packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx
Outdated
Show resolved
Hide resolved
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.
Seems like you need to update some snapshots but other than that this should be good to go 😄
Hello @khmakoto! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
…microsoft#17683) #### Pull request checklist - [x] Addresses an existing issue: Fixes microsoft#17628 - [x] Include a change request file using `$ yarn change` #### Description of changes ContextualMenu: element that's focused when menu is opened now has role = "menu" - Moved `role = menu`, `aria-label` and `aria-labelledby` attributes to container div which is the element that gains focus when menu is opened. - Updated all elements in between container div and first menu item to have `role = presentation`. - Updated Button tests to account for role changes as element with attributes `role='menu'`, `aria-label` and `aria-labelledby` were moved from `onRenderMenuList` to the container div. - Removed 1 `onRenderMenuList` unit test from `ContextualMenu` since `role` will be static as `"presentation"` moving forward.
…microsoft#17683) - [x] Addresses an existing issue: Fixes microsoft#17628 - [x] Include a change request file using `$ yarn change` ContextualMenu: element that's focused when menu is opened now has role = "menu" - Moved `role = menu`, `aria-label` and `aria-labelledby` attributes to container div which is the element that gains focus when menu is opened. - Updated all elements in between container div and first menu item to have `role = presentation`. - Updated Button tests to account for role changes as element with attributes `role='menu'`, `aria-label` and `aria-labelledby` were moved from `onRenderMenuList` to the container div. - Removed 1 `onRenderMenuList` unit test from `ContextualMenu` since `role` will be static as `"presentation"` moving forward.
#### Pull request checklist - [x] Addresses an existing issue: Fixes #17628 https://dev.azure.com/microsoftdesign/fluent-ui/_workitems/edit/10740 - [x] Include a change request file using `$ yarn change` #### Description of changes (give an overview) #### Focus areas to test contextual menu with nexted section (optional) Cherry pick of #17628 & #17683
Pull request checklist
$ yarn change
Description of changes
ContextualMenu: element that's focused when menu is opened now has role = "menu"
role = menu
,aria-label
andaria-labelledby
attributes to container div which is the element that gains focus when menu is opened.role = presentation
.role='menu'
,aria-label
andaria-labelledby
were moved fromonRenderMenuList
to the container div.onRenderMenuList
unit test fromContextualMenu
sincerole
will be static as"presentation"
moving forward.