Don’t use the title attribute for essential information
title attribute can be used to provide additional information about an HTML element, for example a link. As long as that information is not just repeating a link’s text, title text can be useful.
What you should avoid is using the
title attribute for important information that is not available elsewhere. The reason is that some users will not be aware of the title text:
- When you use the keyboard to navigate, most browsers do not display title text (I am not aware of any that do)
- Many screen readers are configured to not read title text unless the user specifically asks for it
- There is a delay before title text is displayed to people who use a mouse and a graphical browser, so they may miss it unless they know it is there
So by all means use the
title attribute when it is appropriate, but do not use it to just repeat link text and do not use it for critical information.
This post is a Quick Tip. Background info is available in Quick Tips for web developers and web designers.