Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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.">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: