Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

fstoe
Copy link

@fstoe fstoe commented Jun 11, 2024

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.

@fstoe fstoe marked this pull request as draft June 11, 2024 09:31
@fstoe fstoe marked this pull request as ready for review June 11, 2024 09:51
@fstoe
Copy link
Author

fstoe commented Jun 12, 2024

Edit: It seems as the keyboard navigation worked as expected when M3 was still using Material Ui v4.

gerdesque
gerdesque previously approved these changes Jul 9, 2024
@@ -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}
Copy link
Collaborator

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?

Copy link
Author

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

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.53%. Comparing base (05194d8) to head (29de071).

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.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants