Blog Post RSS ?

Blogs » JavaScript & CSS » Blank alt attributes
 

Blank alt attributes

by Simon Willison

Roger Johansson has a published a short discussion of the alt and title attributes for images. One point he mentions that I think deserves emphasis is the importance of the blank alt attribute. When checking a page’s accessibility, many people attempt to add a descriptive alt attribute to every image on a page. This really isn’t necessary, and could in fact harm the accessibility of the page! On most sites, many of the images on the page exist for purely decorative purposes; the content would still make perfect sense if the images were removed. These images should have a blank alt attribute, to prevent their display in text or speech browsers.

A pleasant side-effect of moving to CSS based web design is that decorative images tend to end up as CSS background images, rather than inline images in the document. This is certainly the preferred approach, but if a decorative image needs to be included inline but makes no contribution to the underlying content its alt attribute should be left blank. My piece on Writing good ALT text has further tips on this, one of the trickier aspects of web accessibility.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Changing Attributes on MX 2004 Halo Components
  2. alt.ruby
  3. RSS evokes blank stares
  4. CSS at SxSW
  5. Textured Backgrounds

This post has 10 responses so far

Sponsored Links