[Masthead/Footer] Accessibility - The WAI-ARIA attribute 'aria-selected' is not valid for the element <a> with WAI-ARIA role 'menuitem' - DDS Consulting
See original GitHub issue- Hybrid Cloud developer: Andy Blum
- HC Jira ticket:
- DDS consultant: Anna Wen
IBM Equal Access Accessibility Checker The WAI-ARIA attribute ‘aria-selected’ is not valid for the element with WAI-ARIA role ‘menuitem’
Element that is showing this error :-
<a aria-selected="false" aria-expanded="false" class="bx--header__menu-item bx--header__menu-title" aria-haspopup="menu" href="javascript:void 0" tabindex="0" part="trigger" role="menuitem">
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
[Masthead/Footer] Accessibility - The 'role' defined on ... - GitHub
[Masthead/Footer] Accessibility - The 'role' defined on the element is not valid per WAI-ARIA specification - DDS Consulting #6890.
Read more >Using ARIA menus - WCAG WG
With focus on a menu item in the menu bar, repeat this test for every menu item in ... ARIA adds attributes to...
Read more >ARIA: menuitem role - Accessibility - MDN Web Docs
The menuitem role indicates the element is an option in a set of choices contained by a menu or menubar.
Read more >WAI-ARIA: Role=MenuItem - DigitalA11Y
Authors MAY disable a menu item with the aria-disabled attribute. If the menu item has its aria-haspopup attribute set to true, it indicates ......
Read more >How Not To Misuse ARIA States, Properties and Roles
Unfortunately, there is a lot of incorrect use of ARIA, read this post for best practices on how to use ARIA attributes properly....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah I just noticed the above comment from Praveen
In that case @andy-blum can we instead use
selected
attribute instead ofaria-selected
? We can then change the style to use theselected
attribute.I believe we initially added the
aria-selected
attribute because we needed to indicate to screenreaders that the menu item had selected styling. So I would hesitate to remove it without checking with our accessibility QA team. I will bring this up to them.