This is a single element tooltip that is somewhat accessible. Tooltips are activated on hover, or when they receive focus. VoiceOver does announce the content on focus, but not on hover.
To make this even more accessible, we could use two element and a role
-attribute of tooltip
on the element that represents the tooltip. We can link to that element with aria-describedby
. You can read more about role="tooltip"
in the WAI-ARIA specification.
@heydon made an example with role="tooltip"
available on his website.
A Pen by Michiel Bijl on CodePen.