Dropdown is missing critical accessibility attributes #48132
Labels
⌨️ Accessibility
help wanted
The suggestion or request has been accepted, we need you to help us by sending a pull request.
Inactive
What problem does this feature solve?
Currently the Dropdown component does not meet WAI-ARIA standards for Menu Button Pattern (https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/):
Specifically:
Optionally, the element with role button has a value specified for aria-controls that refers to the element with role menu.
And furthermore from the Menu and MenuBar Pattern (https://www.w3.org/WAI/ARIA/apg/patterns/menubar/), though neither of these roles are used in Dropdown, it can be reasonably deduced that in Dropdown, the element with role=button should accept an aria-label prop to assist those with screen readers properly identifying it.
The Dropdown component currently does accept an aria-label prop, but it does not seem to actually get applied anywhere in the DOM structure.
What does the proposed API look like?
Most of the above is satisfied by internal definitions, but the Dropdown component must expose an aria-label prop that maps to the aria-label attribute on the element that has role=button.
The text was updated successfully, but these errors were encountered: