Writing Alt Text

skip nav menu button

Why alt text?

Alternate text provides a description of an image or other visual element to people who use a screen reader. It serves as a medium through which to convey visual information in a textual format, thus allowing visually impaired people to still benefit from the information that images convey.

Considerations for good alt text

How much information does the image convey?

Images that convey more relevant information require more thorough alt text. For example, if the image is just a picture of a person who is referenced in the text, the alt text can simply say something like "a portrait photo of Jade Exampleperson". If, instead, the image is a diagram, or is being analyzed by the text, then the relevant information about the image should be included in the alt text. This may be something like describing the contour of a graph or certain artistic elements of a painting.

What is the purpose of the image?

This question is related to the previous one, but puts more emphasis on the surrounding context. The old adage is that a picture is worth a thousand words, but if the picture isn't relevant to the rest of the content, then there's no need to listen to that many. When writing alt text, you should pay attention to the surrounding content and try to understand the purpose of the image as part of the text and only include the elements that are relevant to the goal of the image. If something about the image is analyzed, then you should make sure to include that in your description.

One example that illustrates this concept well is writing alt text for graphs. While most other images have a somewhat nebulous spectrum of potential information that can be included, graphs are a little more discrete in the levels of description possible. If the graph is discussed in detail, and the data within it is not provided elsewhere, it may be best to alt text it as a table of values with a description of the overall contour for context. If the graph is a visualization of a set of data that is listed elsewhere in the document, you can point to that source in the alt text and just describe the graph's shape. For more information on graphs, see Alt text for graphs.

How should the alt text be structured?

For most images, this should be fairly clear. If you have a painting, for example, you can just describe the relevant visual elements of the painting. However, if the image is a complicated diagram, you may need to consider what the best way to convey that information in a text format is. For some, it may be best to thoroughly describe each element and how they relate to each other. For others, it may be better to write an overall description that depicts the ideas that the whole diagram represents.

Don't include extra information

Alt text should be as concise as possible while fully describing the contents of the image. It shouldn't describe anything not included in the image or that is not conveyed to people without a screen reader.

Alt text for graphs