Repository navigation
fix(fuselage): remove unsupported aria-selected from MenuOption - #42885
Open
mantrapatel05 wants to merge 1 commit into
Open
mantrapatel05 wants to merge 1 commit into
mantrapatel05 wants to merge 1 commit into
Conversation
Contributor
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
Proposed changes
MenuOptionalways setaria-selectedon its element. But menu items (menuitem,menuitemcheckbox,menuitemradio) don't support that attribute, so every item got an invalidaria-selected="false"and axe flagged it.I removed that line. Checkable items already use
aria-checked, and theselectedclass still works the same, so nothing changes visually.Also added a small test file for it. It fails with the old code and passes with the fix.
Heads up: since #42818,
MenurendersItem, soMenuOptionis only used for its types now. Happy to delete it instead if you'd prefer.Issue(s)
Closes #42805
Steps to test or reproduce
Run
yarn jest src/components/Menuinpackages/fuselage.Further comments
Only touched the attribute, nothing else.
Summary by CodeRabbit
aria-selected; theselectedprop continues to apply the selected styling.