Skip to content

Should I use the ‘title’ attribute on images and links?

I’ve previously mentioned the ‘alt’ attribute for website images, which is used to describe what’s in the image to visually impaired users and screen readers. We should all use this. Lesser known is the ‘title’ attribute, which can be used on any web page element, including links and form fields as well as images. If you run a WordPress site, for example, it’s one of four attributes that you can set for an image, along with ‘caption’ and ‘description’. However, unlike ‘alt’, the general consensus seems to be that ‘title’ can now be safely ignored.

The original idea was that when you hovered your mouse over an image or link, the content of the ‘title’ attribute would pop up and reveal more information about the content of what you were hovering over. Very neat, you’d think. But the W3C specification document now says: “Relying on the title attribute is currently discouraged as many user agents do not expose the attribute in an accessible manner as required by this specification (e.g., requiring a pointing device such as a mouse to cause a tooltip to appear, which excludes keyboard-only users and touch-only users, such as anyone with a modern phone or tablet).”

So the word from the top is: don’t bother with it. You can read a more detailed analysis here.