-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Open
Labels
accessibilitya11ya11yhas workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.There’s a bug, but users have a complete workaround, so no urgent fix or release is needed.scope: tooltipChanges related to the tooltip.Changes related to the tooltip.
Description
Steps to reproduce
Steps:
- Open this link to live example: https://mui.com/material-ui/react-tooltip/
- Look at the tooltip code (the HTML generated in the browser console)
- There is an aria-label attribute inside the button
- That will unfortunately overwrite the button content, for assistive technologies like screen readers.
Current behavior
The aria-label inside the button is erasing the accessible name of this button, like:
<button type="button" aria-label="add">Margin</button>
Screen readers will here read "Button add", instead of "Button Margin add".
Expected behavior
The aria-label inside the button should be removed, like:
<button type="button">Margin <span class="MuiTouchRipple-root css-4mb1j7">Add</span></button>
To provide an accessible tooltip, we should only generate a text in the span inside this button, when focusing it.
Context
Make the MUI tooltip more accessible (comprehensive) for screen reader users.
Your environment
Chrome v142, tested with NVDA.
Search keywords: tooltip
Metadata
Metadata
Assignees
Labels
accessibilitya11ya11yhas workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.There’s a bug, but users have a complete workaround, so no urgent fix or release is needed.scope: tooltipChanges related to the tooltip.Changes related to the tooltip.