Skip to content

Instantly share code, notes, and snippets.

@davatron5000
Last active December 12, 2015 05:09
Show Gist options
  • Save davatron5000/4719835 to your computer and use it in GitHub Desktop.
Save davatron5000/4719835 to your computer and use it in GitHub Desktop.

How-to: Use TITLE attributes

Short answer: Don't use them, except in special circumstances.

HTML title attributes are often perceived as an accessibility (and SEO) bonus, but the opposite is true. For screen reader users the content included inside of the title attribute is typically unncessary, redundant, and possibly not even used. Conversely, content being put in the title attribute is being hidden from the (probable) majority of your users. If information is being hidden from the majority of your users, then it's probably not necessary.

There are a few times when using a title attribute is appropriate:

  • For <frame> and <iframe> elements
  • For providing a label when a text label would be redundant

Rule of Thumb: Serve all users equal content.

Further reading

@heitzke
Copy link

heitzke commented Apr 6, 2013

@Arty-chan agreed. Screen readers that I've used entirely ignore the title attribute (out of the box anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment