mirror of
https://github.com/primer/css.git
synced 2024-11-23 11:27:26 +03:00
b8d3756b8e
`aria-label` can be used on any element, and is even used on the `<span>` example right below this paragraph. I verified this with ChromeVox+Chrome and VoiceOver+Safari.
604 B
604 B
layout | title |
---|---|
page | Tooltips |
Add tooltips built entirely in CSS to nearly any element. Just add a few classes and an aria-label
attribute.
In addition, you'll want to specify a direction:
.tooltipped-n
.tooltipped-ne
.tooltipped-e
.tooltipped-se
.tooltipped-s
.tooltipped-sw
.tooltipped-w
.tooltipped-nw
Tooltip classes will conflict with Octicon classes, and as such, must go on a parent element instead of the icon.
{% example html %} Text with a tooltip {% endexample %}