-
Notifications
You must be signed in to change notification settings - Fork 257
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
fix keyboard navigation issues with windowTopMenu #3914
base: main
Are you sure you want to change the base?
Conversation
Edit: It seems as the keyboard navigation worked as expected when M3 was still using Material Ui v4. |
src/components/WindowViewSettings.js
Outdated
@@ -63,10 +67,11 @@ export class WindowViewSettings extends Component { | |||
none of the click handlers work? */ | |||
const menuItem = ({ value, Icon }) => ( | |||
<ViewOption | |||
selected={windowViewType === value} | |||
key={value} | |||
aria-selected={windowViewType === value} |
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.
Is aria-selected a valid/useful attribute for menu items? I'm not seeing it on https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitem_role. Maybe this should be a menuitemradio
+ aria-checked
?
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.
Ah thanks for spotting :)
i added aria-checked
and menuitemrole
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3914 +/- ##
==========================================
+ Coverage 94.52% 94.53% +0.01%
==========================================
Files 313 313
Lines 14767 14798 +31
Branches 2496 2498 +2
==========================================
+ Hits 13958 13989 +31
Misses 804 804
Partials 5 5 ☔ View full report in Codecov by Sentry. |
Hello,
this PR tries to fix the issue described here: #3903
The reason why view and thumbnail options could not be controlled correctly was due to the use of the MUI Menu component and not the wrong TabIndex as described in the issue. The component expects MenuItems as direct children. This was fixed by using a popover instead of the menu, (on which menu is based upon) and setting the MenuLists in WindowViewSettings and WindowThumbnailSettings.