Dive Into Accessibility

30 days to a more accessible web site

Day 23: Providing text equivalents for images

This is the most important day of the series, so pay attention:

Every single image on every single page of your site should have a text equivalent, so-called "alt text", specified in the alt attribute of the <img> tag.

Screen readers read it, text-only browsers display it, Google indexes it, and visual browsers can display it as a tooltip or on the status line (although you as the designer can override this). We've already seen how to specify empty alt text for spacer images, and several ways to create accessible lists with image bullets. What's left?

They all need appropriate alt text.

Who benefits?

  1. Jackie benefits. JAWS reads the alt text. Without valid alt text, Jackie hears the filename instead, which sounds horrible.
  2. Marcus benefits. Lynx, as a text-only browser, doesn't display any images, only alt text. Without alt text, Lynx displays the filename, which looks as bad as JAWS sounds.
  3. Michael benefits. Links, as a text-only browser, doesn't display any images, only alt text. Without alt text, Links does not display anything for an image (unless the image is a link, in which case Links simply displays "[IMG]"). When browsing with Opera with images turned off, Michael sees the alt text in place of the image.
  4. Lillian benefits. Internet Explorer displays the alt text as a tooltip (although you as a designer can suppress this).
  5. Google benefits. The Googlebot indexes alt text, which is used not only in matching keywords in normal searches, but also in image searches. (How did you think that worked?)

How to do it

The default Movable Type template doesn't include any <img> tags. If you are using a graphical "Powered by Movable Type" image, you should make sure the <img> tag includes the attribute alt="Powered by Movable Type".

The default Greymatter template includes only one image, generated by the `` template variable. This generates an <img> tag which includes appropriate alt text, "Powered by Greymatter".

Radio auto-generates appropriate alt text for the following standard icons:

However, Radio users will need to manually specify alt text for customized images. Go to Prefs, then Customized Images (under Templates), and add these alt attributes:

You could also add title="" to suppress tooltips in visual browsers.

Of course, regardless of your publishing tool, if you've added your own images to your template, or if you have small graphics floated in your item posts, they each need appropriate alt text. Since I learn best by example, here are some examples. More general principles and examples are listed in the "further reading" section.

Examples of bad alt text

Examples of good alt text

Further reading