This one’s going to be controversial. I’m doing a lot of coding at the minute, sticking as best I can (naturally) to using DIVs, CSS and all that. It’s quite refreshing to realise that you can almost entirely eliminate imagery from the page code itself. But, of course, not always. And if you’re using inline images, you have to use ALT text, for accessibility and all that. Right? Well, maybe. I’m no longer convinced that it’s an absolute.
The W3C guidelines are pretty clear. Indeed, it’s actually checkpoint 1.1. ‘Provide a text equivalent for every non-text element (e.g., via “alt”…’ But let’s bear in mind these guidelines were published eight and half years ago: the days of banner imagery, text in GIF files, and all that. Most of which, thankfully, is behind us.
Here’s the quandry. Let’s say you have an article about Joe Soap. You’ve got Joe Soap’s name in the headline, and Joe Soap’s name throughout the article. You decide to add a picture of Joe Soap to make your page look a bit prettier. It’s just any old picture of Joe Soap; it’s not directly relevant to the story. Do you:
- interrupt the screen reader’s passage through the text of the story, to say ‘it’s an image of Joe Soap’? (Like it’s going to be an image of something else?) or
- leave the ALT text blank?
My inclination is the latter. It’s surely better, in terms of usability generally, to make a judgement call, rather than relying on the absolute. Does the reader need to know what the image is? Is it essential / important / helpful to the reader’s experience? It may not be.
The Wikipedia page on the subject says: ‘While the use of meaningful alt text is necessary to comply with accessibility standards, and is good practice, sometimes an image is used for purely decorative purposes. In this case, one should use an empty alt attribute (alt=””).’ That sounds about right to me. But strictly speaking, that’s not what the W3C guidelines say… and that’s what we’re supposedly held to.