-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Tooltips and aria-describedby: Screenreaders don't see them #16134
Comments
Precision: also on |
It's probably implicit in the documentation (and I'll make a note to add a clarification here), but as all examples given at http://getbootstrap.com/javascript/#tooltips show tooltips added to actual form controls/focusable elements, it's the assumption that people will use them purely on those types of elements. |
I'm not happy with this approach. Why not having all the tooltips in the DOM all the time and just showing/hiding them visually on hover and on focus? Then screenreaders would see tooltips on non-focusable elements too. |
You also mention that one can add tooltips to non-focusable elements by making them focusable via |
Feel free to propose, as a separate pull request, some wording for the callout that you feel is more appropriate. |
There's no problem with the wording, but with the technical approach that leads to the current behaviour. If the current behaviour wouldn't limit tooltips to focusable elements only, there wouldn't be the need for a callout. At least, Bootstrap should make sure that tooltips only show on focusable elements, because the way it is now, people happily throw tooltips everywhere and nobody realises that they are not accessible. |
And I'm not happy with that approach, for a few reasons:
So, I'm aware that the current approach for tooltips (or rather, how developers are using it randomly on all sorts of elements) isn't ideal. But for now, I'd rather give advice in the docs that adds a few extra elements in the tab order if that means sighted keyboard users can also benefit from the tooltip More fundamentally, changing the actual functionality of the tooltip code to only work when on a focusable element is a severe break in backwards compatibility, and we're definitely not in a position to do this in Bootstrap version 3 going forward, as an update to Bootstrap would then immediately break all sites that historically have used tooltip (wrongly, I'll grant you) on non-focusable elements. For the time being, the best approach we can have is to strengthen the advice in the documentation. However, the idea of making tooltip only work in the correct situations is something that I'll put on the list for version 4, where we can make more radical behavioural changes to the code - and enforce that tooltip only work on focusable elements. /cc @cvrebert |
Thank you for this very good explanation. I agree with your statement. Hopefully accessibility will become a greater focus in future versions of Bootstrap! 👍 |
The Bootstrap tooltips seem to be implemented with blind users in mind, because they have an
aria-describedby
attribute. Sadly though, that screenreaders will never see this information, as it is only present in the DOM when the tooltipped element is hovered with the mouse, and blind people do not use any mice.The text was updated successfully, but these errors were encountered: