-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip does not consistently provide accessible label for button #2583
Comments
I don't have all the context here, but maybe it would make sense for the tooltip to never be |
From this article by Steve Faulkner:
So basically you can have something act as a label/descriptor even when it's hidden, and I'd argue it's this exact use case where that's appropriate -- where you want to avoid having the text read twice. The markup I'd use: <button
id="${badgeId}"
style="background-image:url(${this.award.Award.ImageData.Path})"
@click="${this._awardClick}"
class="d2l-award-button"
></button>
<d2l-tooltip for="${badgeId}" for-type="label" align="${tooltipAlign}">${this.award.Award.Title}</d2l-tooltip> |
For context, Allan added the Maybe he used |
So if we decide to remove it, I think I would check that scenario with a screen reader. |
oooh you guys responded this is so cool. I'm a huge fan guys. So @dlockhart you're totally correct and the accessible name spec supports that. Crazy enough when I tried with NVDA + Firefox it works totally fine, but with NVDA + Chrome and JAWS + Chrome the issues were present. |
Also something I've learned, disabling the |
Yep, @dlockhart in my bit of testing (on the localhost testing page for BTW your quote says the target can be
Edit: Seems like it's maybe more complicated than |
We're using tooltips in Awards Leaderboard UI repo, and there is an issue where they do not provide accessible labels until they have been activated with focus or hover.
What I've tried:
aria-label
on the button. This does not work because thed2l-tooltip
will addaria-labelledby
to the button which overridesaria-label
.aria-label
on the tooltip. This works, but is undesirable because the tooltip always gives itselfaria-hidden="true"
.The text was updated successfully, but these errors were encountered: