3 ms·
To address the screen-reader concerns: As a proof of concept I was able to swap out `data-hint` for `aria-label` without issue: https://github.com/jdan/hint.css
by prezjordan 11y ago
To address the screen-reader concerns: As a proof of concept I was able to swap out `data-hint` for `aria-label` without issue: https://github.com/jdan/hint.css/commit/e6541166ec055c525485c5922027aab0b7a25004 https://github.com/jdan/hint.css/commit/e6541166ec055c525485...
`aria-label` is essentially used twice here - both to populate the tooltip's contents, and to provide an accessibility label to the element that can be read off by a screen-reader.
I proposed these changes to the maintainers under an existing a11y issue (yay to people thinking about it!), but pointed out that if folks are using this library to supplement the contents of an element with a tooltip instead of labeling it, then the a11y changes are not ideal because a screen-reader will omit the element's contents in favor of whatever is inside the tooltip. My gut tells me that this library is mainly used to annotate things like icons.