Screen readers make use of the alternative text for images. As such, the alternative text should be descriptive of the content and function of the image and generally less than 50 characters. In School Loop's CMS, where images can be inserted, you'll find an "Alternate Text" field in the toolbar. The following examples illustrate the most common use cases.
Drawings or Photographs
The alternate text for this image could simply be "Albert Einstein".
Images with Text
Use the text in the image as the alternate text.
alt="Go vote today"
Images Used as Links
If the image stands alone a the link, the alternate text should be the content of the image.
When Not To Use Alternative Text
There are two cases where the alternative text field should be left blank. In fact, it would be wrong to add alternative text in these cases.
- The image is purely for decorative purposes.
- Text associated with the image describes the image.
The first case is easy to understand; these two example help to explain the second case:
Albert Einstein (14 March 1879 – 18 April 1955) was a German-born theoretical physicist who developed the theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics). Einstein's work is also known for its influence on the philosophy of science. Einstein is best known by the general public for his mass–energy equivalence formula E = mc2 (which has been dubbed "the world's most famous equation"). He received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect", a pivotal step in the evolution of quantum theory. (Text from Wikipedia)
In the example above, the image provides no content not already covered in the paragraph, so it's purely decorative and the alternative text should be left blank.
If the link includes both an image and text, then it's best to leave the alternative text field blank because the text portion of the link covers both the content and the function.
We suggest WebAIM's article on alternative text.