WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: client using title instead of alt on image.

for

From: Jukka K. Korpela
Date: Apr 1, 2010 11:27PM


Dean Hamack wrote:

> I could be wrong, but I don't think it's valid markup to use a title
> on an image. Run it through a validating tool and see.

Why didn't _you_ run it through a validator?

>> A client has an image (with text) for a website banner and instead
>> of putting alt text on the image, they have used the title attribute
>> (title="text of image"). I know it's a bad idea, but how do I best
>> explain it to the client?

It depends on the client. The use of an alt attribute is a very basic, very
primitive, very often misunderstood and misrepresented point in
accessibility. But it depends on the client what matters to him. You might
even be able to cite a requirements document that he must satisfy due to
something imposed on him.

Although the use of a title attribute surely does not make a document
invalid, the lack of an alt attribute surely does. But that, as such, is
just a formal point.

You might draw the client's attention to various reasons for using the alt
attribute, see
http://www.cs.tut.fi/~jkorpela/html/alt.html#reasons

(It's a very limited point of view to consider only what happens on
speech-based user agents that you know of. The alt attribute had a point
long before any such user agents existed.)

The odds are that if you need to specifically explain this point to a
client, you will have hard time with other, more difficult aspects of
accessibility. After all, it costs virtually nothing to add alt attributes
if you already have title attributes that work reasonably as textual
replacements for the images, i.e. in the role alt - you would just use the
same values then.

I guess the use of title attributes might reflect the trend among browsers
not to show the alt attribute value on mouseover (but show the title
attribute value). I recently noticed that IE 8 does not show the alt
attribute value even in the absence of a title attribute - in "standards"
mode (vs. "quirks" mode). Of course designers who have used the alt
attribute due to its mouseover effect may think they need to "switch" to the
title attribute. It's quite possible that the attribute value then in
unusuitable as a textual replacement, but this really depends.

--
Yucca, http://www.cs.tut.fi/~jkorpela/