The Carbon Overflow Menu is not completely accessible. It still needs:
See the APG menu button pattern for guidance, including either of the Action Menu Button examples (not the Navigation Menu Button example).
Here's a sample of what the html would look like with the additional roles and aria-* attributes:
<div data-overflow-menu tabindex="0" aria-label="Overflow" class="bx--overflow-menu" role="button" aria-haspopup="true" aria-expanded="false">
<svg aria-hidden="true" class="bx--overflow-menu__icon" width="4" height="20" viewBox="0 0 4 20">
<circle cx="2" cy="2" r="2"></circle>
<circle cx="2" cy="10" r="2"></circle>
<circle cx="2" cy="18" r="2"></circle>
</svg>
<ul class="bx--overflow-menu-options" tabindex="-1" role="menu" aria-label="Overflow">
<li class="bx--overflow-menu-options__option" role="presentation">
<button class="bx--overflow-menu-options__btn" data-floating-menu-primary-focus>Option 1</button>
</li>
<li class="bx--overflow-menu-options__option" role="presentation">
<button class="bx--overflow-menu-options__btn" role="menuitem">Option 2</button>
</li>
...
</ul>
</div>
Notes:
<button> for the menu button, and not just <div role="button"> so that you get button semantics & behavior for free (you may have a bit more challenge styling it, but I think? it should be possible)@carmacleod Thanks for taking the time to not only create the issue but fill us in on the intended vs actual behavior of the component. This really helps increase the speed in which we can get these fixes merged in 馃槃
Oh, by the way, please do _not_ copy the "open on hover" behavior from the APG menu button examples.
(I mentioned to them that I think they should remove that particular behavior).
Leaving comment to get my profile attached to this thread.
@tw15egan When fixed, please test with keyboard, and then test again with screen reader. If possible, please test with VoiceOver in Safari on Mac, and with JAWS and/or NVDA in Firefox and/or Chrome on Windows. I would be happy to help test - please contact me.
:tada: This issue has been resolved in version 9.20.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket: