1

If an image is featured on a landing page and isn't a hyperlink, is it still relevant to make use of the title attribute?

I'm seeing less and less websites make use of it and with mobile websites it's completely redundant - am I missing a particular use case?

  • Totally unnecessary these days. silktide.com/… It's only useful for tooltips for visual users who are using a mouse. And really, if they're fully sighted then what additional content in a tooltip over an image is going to be useful for them and not anyone else? – JonW Jun 5 '18 at 10:35
4

The correct attribute for providing a textual alternative to an image is alt. Including an alt attribute is a requirement of the HTML standard, but it's not required that the alt attribute contains content (alt="" is acceptable if the image is purely decorative and contains no meaningful content).

title, meanwhile, is purely optional and always has been - it can implement a simple tooltip, if that's something you'd like to do (bear in mind that it won't work on touchscreen devices, though).

See also WebAIM's guidance (emphasis in original):

Every image must have an alt attribute. This is a requirement of HTML standard (with perhaps a few exceptions in HTML5). Images without an alt attribute are likely inaccessible. In some cases, images may be given an empty or null alt attribute (e.g., alt="").

Note that the "few exceptions" refers to a fairly unusual situation mentioned in the W3C HTML spec where figcaption is already used to provide a caption, and where "the author is unable to provide an appropriate text alternative", and even then "Such cases are to be kept to an absolute minimum. If there is even the slightest possibility of the author having the ability to provide real alternative text, then it would not be acceptable to omit the alt attribute."

| improve this answer | |
  • Welcome to UX.SE! Thanks for the answer. Would you mind editing your answer to include a short excerpt from the article you linked? That would help to preserve this answer's usefulness in the event that the article moves or otherwise becomes unavailable. – maxathousand Jun 5 '18 at 13:41
  • @maxathousand Done and done. – Lionel Rowe Jun 7 '18 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.