DEV Community

Cover image for A Small thought regarding Tooltips. 🤔
MilesWK
MilesWK

Posted on

A Small thought regarding Tooltips. 🤔

Tooltips, or title in HTML terms, are really important in our day-to-day lives. They give us more information, especially when we need it.

Hold on, what is a tooltip?
Tooltips are those little messages that appear when you hover over something, usually a button:
A GIF of someone hovering over text, and then a tooltip appears.

In HTML, this is achieved by setting the title property. For the example here, I simply used this code:

<h1 title="This is a tooltip">
  Hover me!
</h1>
Enter fullscreen mode Exit fullscreen mode

For more on tooltips, check out the details in the MDN Web Docs.

Pros

  • They allow you to give information to a user, without having it posted on the screen.
  • They can be read by screen-readers.

Cons

  • Touch-screen devices can't see them.
  • If you are using a keyboard for navigation, you can't hover over things.

How do they effect us?

A fork button that can't be pressed.
Take this button. It is a GitHub Fork button, but it can't be pressed. Zooming out, there isn't any details as to why I can't press them:
More details...
But when someone hovers over it, it gives the reason why you can't press it:
An

Whenever you are out on a website, and you see something that can't be pressed, stop and think to yourself, and then hover over it. Chances are, it will tell you why you can't press it, but only until you hover over it.

Top comments (1)

Collapse
 
mileswk profile image
MilesWK

Tell me where else you experience these things!