[Chip] deleteIcon has role set to presentation #19468
Labels
accessibility
a11y
component: chip
This is the name of the generic UI component, not the React module!
discussion
The element that relates to the delete icon in Chip elements when the onDelete prop is set has role set to "presentation".
As this element performs an action, and there isn't any way to set an aria-label on the SVG, this seems to break accessibility rules.
https://www.w3.org/TR/wai-aria-1.0/roles#presentation
Current Behavior 😯
Automation tools that attempt to detect the delete icon (in order to click it, for example), need to detect the MuiChip-deleteIcon css class.
Accessibility tools don't complain about the icon being "inaccessible" because it has the "presentation" role set
Screen readers don't detect the delete icon (but do detect the chip itself)
delete button is "invisible" to screen readers.
Expected Behavior 🤔
Screen readers should read out the delete button when selected.
Automation tools should be able to select the delete icon by an aria-label that describes what the button does
Steps to Reproduce 🕹
https://codesandbox.io/s/confident-solomon-e0v8o
Steps:
Context 🔦
I need a fully accessible site, where any item that can be interacted with can be detected by visually impaired users.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: