-
Notifications
You must be signed in to change notification settings - Fork 448
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
Not accessible at all #19
Comments
Keyboard support can be easily added using :focus. |
@jmuheim For screenreaders, a good technique would be appending a hidden element with the same content of the tooltip inside the tooltip elements. As Balloon.css do not use JavaScript, you cannot achieve it with this library alone. However this can be easily achieved with a little bit of JavaScript and CSS on your project: // Append a span with tooltip text to all elements containing tooltips
var tooltips = document.querySelectorAll('[data-balloon]');
tooltips.forEach(function (tooltip) {
var span = document.createElement('SPAN');
span.setAttribute('class', 'hide-me');
span.innerHTML = tooltip.getAttribute('data-balloon');
tooltip.appendChild(span);
}); /* make the span invisible to non-screenreaders */
[data-balloon] span.hide-me {
position:absolute;
width: 1px;
height: 1px;
overflow: hidden;
} |
Why not |
Yes, |
@kazzkiq Are there any plans on replacing |
Anywhere there is a Unfortunately to get more screen reader friendly, we'd need to toggle aria-expanded and aria-hidden (which I would also recommend) we'd need to rely on jQuery or javascript. Or as mentioned above, duplicating the information in an aria-label could work. Screen readers can't read content in a psudo element. I'd be happy to help contribute. |
@eladrin201 It seems PR #56 addresses most of those points. But since I've never worked directly with accessibility, I believe I'm not the best fit to define if that PR is enough to solve our problems Could you please take a look at it and check if it fixes accessibility or if we should add any other features to it? |
Closing this as with |
Adding ideally first the button content should be announced and then the tooltip content. For accessibility Any thoughts on this @kazzkiq ? |
@ad1992 That's an issue I didn't knew about. In this case we have two options:
Both cases are harmful to acessibility and not ideal IMO, so I would like to hear opinions on this one. Workarounds are also welcome. |
@ad1992 can you please open a new Issue explaining your discovery so we can track it better there instead of reopening this one? |
Neither keyboard only users nor screenreader users will ever be able to perceive these tooltips. A pity.
The text was updated successfully, but these errors were encountered: