Interactive Examples
Icon Buttons with Tooltips
Tooltip Positions
Options
Label
Icon buttons have a visually hidden label utilizing aria-label
. To instead display that label in a tooltip, the label
option should be used. The label
serves as the accessible name for the control utilizing aria-labelledby
under the hood.
Description
The description
is intended to supplement the control's text label by utilizing aria-describedby
under the hood, and will be announced to a screen reader in addition to the label. Keep the description short and concise.
Alternatives to tooltips
Before adding a tooltip, please consider: Is this information essential and necessary? Can the UI be made clearer? Can the information be shown on the page by default? See Tooltip alternatives for more accessible alternatives.
1. Persist the content
If possible, persist the content so it's always available rather than using a tooltip, which hides content by default. This ensures that the content is always discovered and surfaced to users regardless of device.
Find an appropriate permanent place to display additional information.
Don't use a tooltip to add additional helpful information
Additional resources
Feedback
Help us improve this component by providing feedback, asking questions on Slack, or updating this file on GitHub.