Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

7. Accessibility > 7.1. Writing Appropriate alt Text Descriptions

7.1. Writing Appropriate alt Text Descriptions

Problem

You want to add a text alternative for an image.

Solution

Add the text alternative programmatically using the alt attribute of the image.

If an image deserves a text alternative that can be summed up in one to two sentences (or about 75 words or less), set that text as the value of the alt attribute:

<img src="next_button.jpg" alt="Go to the next page.">

Note

Alternative text should not exceed 150 characters.

How do you know how well the alternative text works? A good rule of thumb is, “If you replace every image on the page with its text alternative, the page conveys the same meaning as when the images are displayed.”

If the image is complex, like a chart or diagram, and cannot be simply summarized, include the additional information adjacent to the image or link the image to a longer, more detailed text alternative:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial