Circular option picker: incorrect usage of Tooltip #68601
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
Similar to #66271, #68591 and #68597 where a Tooltip component wraps a Button that uses an explicit
aria-label
attribute instead of thelabel
prop.This is unnecessary and introduces a risk where the visibel tooltip text mismatches the accessible name determined buy the
aria-label
attribute.Additionally, the Ariakit-based Tooltip adds a dynamic
aria-describedby
attribute. As such, the accessible name and description repeat the color name unnecessarily. For example the button would have:Accent
This way, screen readers would announce the color name twice, the first time as part of the accessible name, the second time as the accessible description:
In this case, an additional accessibility problem is that the visible tooltip text mismatches the actual accessible name, This is a problem for sighted screen reader users and for voice control / speech recognition software users. For example, voice control users would see a tooltip with text
Accent
and may try to issue a voice command such asclick Accent
. That won't work because the actual accessible name isColor: Accent
.Worth reminding the tooltip should only be used to visually expose the actual accessible name of an interactive control.
Step-by-step reproduction instructions
Color: Accent
, and then the accessible description e.g.Accent
.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: