-
Notifications
You must be signed in to change notification settings - Fork 7.5k
fix: invalid HTML #9040
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
base: main
Are you sure you want to change the base?
fix: invalid HTML #9040
Conversation
Added a role of "group" to all MenuButton components removes the HTML validation issue of "An element with role=menuitemradio must be contained in, or owned by, an element with role=menubar or role=menu or role=group" as MenuItem components can have a role.
|
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
|
Menus that are not disabled do have |
|
Removing I feel better options would be either to add |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9040 +/- ##
=======================================
Coverage 84.32% 84.32%
=======================================
Files 120 120
Lines 8153 8154 +1
Branches 1964 1964
=======================================
+ Hits 6875 6876 +1
Misses 1278 1278 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Fixes HTML validation
Specific Changes proposed
Maintain the role of "menu" on all MenuButton components which removes the HTML validation issue of:
...as MenuItem components can have a role.
Instead, add
aria-hidden="true"on the MenuButton components without items to hide them from assistive technologies.Tested in https://validator.w3.org/ with the included sandbox example.
Requirements Checklist
npm run docs:apito error