{"id":382082,"date":"2024-10-29T08:01:18","date_gmt":"2024-10-29T14:01:18","guid":{"rendered":"https:\/\/css-tricks.com\/?p=382082"},"modified":"2024-10-29T08:09:25","modified_gmt":"2024-10-29T14:09:25","slug":"tooltip-best-practices","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/tooltip-best-practices\/","title":{"rendered":"Tooltip Best Practices"},"content":{"rendered":"\n

In this article, I try to summarize the best practices mentioned by various accessibility experts and their work (like this<\/a>, this<\/a>, and this<\/a>) into a single article that’s easy to read, understand, and apply.<\/p>\n\n\n\n

Let’s begin.<\/p>\n\n\n\n\n\n\n

What are tooltips?<\/h3>\n\n\n

Tooltips are used to provide simple text hints for UI controls. Think of them as tips for tools. They’re basically little bubbles of text content that pop up when you hover over an unnamed control (like the bell icon in Stripe).<\/p>\n\n\n\n

\"Hovering
The “Notifications” text that pops up when you hover over Stripe’s bell icon is a tooltip.<\/figcaption><\/figure>\n\n\n\n

If you prefer more of a formal definition, Sarah Highley provides us with a pretty good one:<\/p>\n\n\n\n

\n

A “tooltip” is a non-modal<\/a> (or non-blocking) overlay containing text-only content that provides supplemental information about an existing UI control. It is hidden by default, and becomes available on hover or focus of the control it describes.<\/p>\n<\/blockquote>\n\n\n\n

She further goes on to say:<\/p>\n\n\n\n

\n

That definition could even be narrowed down even further by saying tooltips must provide only descriptive text.<\/p>\n<\/blockquote>\n\n\n\n

This narrowed definition is basically<\/strong> (in my experience) how every accessibility expert defines tooltips:<\/strong><\/p>\n\n\n\n