Replies: 1 comment
-
Interesting idea, we probably face this too. I'll bring it up with the team. In the meantime, if you add a wrapper around your tooltip contents with aria-hidden, that should also do this. Then you shouldn't have to mess with the props. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks, thanks for the great library!
We're trying to use Tooltip in the Storybook codebase for our toolbar buttons, selects and toggles, which don't have a text label.
In these components, we're currently deploying a pattern where each has an aria-label and a tooltip. We alter their content to avoid redundant SR announcements. For instance,
aria-label="Measure"
andtooltip="Toggle measure"
aria-label="Theme"
andtooltip="Select theme"
In some rare instances, we use
aria-describedby
to explain what feature a button controls, when we think there's reasonable doubt for SR users to not understand what it does.Having the tooltip repeated in
aria-describedby
would create redundancy in SRs we test with, and would overwrite our own descriptions. Of course, we can and will filter the attribute out, but I feel like this warrants an option in the underlying hooks and a documentation explanation for when which approach is most appropriate.Beta Was this translation helpful? Give feedback.
All reactions