Alternative Text

When images are present in Web content, provide meaningful alternative text description so that users of screen readers can have the image described to them.

A good alt conveys what an image communicates, not what it contains. A picture of a child kicking a ball might have been selected because of the setting, the child, the kick or the ball, and the context determines the best description:

  • Child happily kicking a ball on a summer day
  • A.J. playing in the new team uniform
  • A.J.'s game-winning kick curved in from the left sideline!
  • The "medium" ball is the right size for this 9-year-old child

Best Practices

  • Describe the image in context based on what details the image adds to the text.
  • Keep the descriptions short and concise; roughly 140 characters or less.
  • Do not use the word “graphic or image” in the description ("image of a running dog"), as the screen reader already takes care of it. Just say "a running dog."
  • Use an empty alt (alt='"") for images with no visual meaning, like spacers or background textures, to tell screen readers you know what an alt attribute is, but you want them to not mention the image when reading the page.

If you need more than a sentence to describe the image, move the extra information into the visible text of the page. E.g., provide a table version of a chart, or a deep caption describing the complicated parts of the picture. This lets screen reader users explore the information in smaller chunks (by sentence or table cell), and also lets readers with low vision enjoy a text version of a graphic they may struggle to resolve.

Don't do This

alt="ama-dablam-2064522_1280.jpg"

ama-dablam-2064522_1280

The image has alternative text that reads "ama-dablam-2064522_1280" which is the file name from the stock house from which it was downloaded. A screen reader will read this one character at a time, and the screen reader user will have no idea what the image contains or means.

 


alt="divider line"

Divider line.

Visual users get to skim over spacer elements; giving them descriptive alternative text means screen reader users have to stop and think about each one.

Do This

alt="Snowy mountain peak shrouded by clouds"

Himalayan mountain peak

This alternative text describes the image adequately. Depending on the context, it may also be appropriate to mention the snow, or to wax poetic about the clear sky and clouds, or to emphasize that attempting to ski here is inadvisable to the many cliffs and crags.

 


alt=""

Divider line.

This empty alt instructs the screen reader to jump over this image and read the next paragraph. This is what most users would prefer.