ui-components
ui-components copied to clipboard
Add aria-label support to button component
Summary:
Add an aria-label property to the button component so product teams can provide a precise accessible name when the visible label alone isn’t specific enough (e.g., multiple “Save” buttons on one page)
Acceptance criteria:
- Button accepts aria-label and, if used, becomes the button's accessible name.
- If both visible text and aria-label are provided, the accessible name reflects aria-label
- Docs updated
- Added to the component playground
- Added to the property table
Question
Should we also consider adding aria-labelledby?
Spoke to a member from the Assistive Technology working group. This member supported adding this feature to the button. The issue will be maintained in the backlog.