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

Menu has incorrect ARIA roles #5372

Closed
amlehman opened this issue Dec 5, 2023 · 4 comments
Closed

Menu has incorrect ARIA roles #5372

amlehman opened this issue Dec 5, 2023 · 4 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@amlehman
Copy link

amlehman commented Dec 5, 2023

What package has an issue?

@mantine/core

Describe the bug

The Menu and MenuDropdown components fail a WCAG/508 accessibility scan with "Certain ARIA roles must contain particular children". There is an extra div wrapping the elements with role=menuitem causing them not to be direct descents of the element with role=menu as they should be.

Screenshot 2023-12-05 at 9 49 21 AM

What version of @mantine/* packages do you have in package.json? (Note that all @mantine/* packages must have the same version in order to work correctly)

6.0.21

If possible, please include a link to a codesandbox with a minimal reproduction

No response

Do you know how to fix the issue

None

Do you want to send a pull request with a fix?

None

Possible fix

Remove extra div or add role=group to it, example: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/group_role#examples

@rtivital
Copy link
Member

rtivital commented Dec 7, 2023

Fixed in #5335

@amlehman
Copy link
Author

amlehman commented Dec 7, 2023

Hi, I'm still seeing the issue present in 7.3.1. I'm also not seeing anything in that pull request that would have addressed the menuitem elements not having a parent element with a valid role.

@rtivital rtivital reopened this Dec 7, 2023
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Dec 8, 2023
@rtivital
Copy link
Member

Fixed in 7.3.2

@vijayprasanna13
Copy link

I'm seeing this in 7.4.0. Is there a workaround available?

Screenshot 2024-02-20 at 4 27 13 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

3 participants