Alternative text (alt text) provides access to non-text information like images by providing descriptions that are read aloud by screen reader software or provided in text on screen for those who can not see the image. What you decide to write as the alt text is highly subjective and depends mostly on the context of why you are using the image. Alt text is meant to convey what information about the image is most important, not necessarily a full description of the entire image.
Main Considerations
- Alt text must always be addressed for each image, without giving this direction, most screen reader software will either read the filename or nothing.
- Most screen readers announce the presence of an image before reading the alt text, so using words such as "photo" "graphic" and "image" should be avoided unless it helps convey further important meaning.
- Some images are purely decorative. There would be no meaningful difference if the image was removed. Whether you can mark images as decorative is platform specific.
- Also note that screen readers are only able to pick up “true text”, as opposed to images of text. Any text that you cannot highlight with a mouse is not “true text” and won’t get picked up by screen readers.
Examples
If you are using an image on an employee directory, the alt text likely just needs to be the person's name, not a full description of the image. In that context, for the following image, "Becky Bangs" would be appropriate alt text.
The next image is a picture from an OSU Corvallis commencement. Thinking about the purpose for sharing the image will help decide what choice in the list below to use as alt text:
- If the image is being used just to highlight commencement, the alt text could be, "OSU Corvallis commencement at Reser Stadium"
- If the scale of commencement is important for context and that is not provided in text on the page for all to read, the alt text could be, "OSU Corvallis commencement at Reser Stadium with thousands of graduates on the field and thousands of spectators in the stands"
- If identifying the speaker on stage is a main reason for sharing this image, say for a Dean addressing a college's graduates, or in this case the commencement speaker, the alt text could be, "Commencement speaker Nicholas Kristof addressing graduates"
- If this image was being used by the vendor who provided tents, chairs, and stage equipment the alt text would likely include something about that too because they would be sharing the image to highlight their services.
General Resources
The following resources are helpful regardless of which platform you are working on.
- Guidance and tips on how to write effective alternative text.