How to Write Image Alt Text: Practical Examples for Photos, Charts and Decoration

Illustration combining a picture and a text description

When adding images to an article, describing what each picture shows in the same way does not always communicate what readers need. Alternative text, or alt text, conveys an image’s role or content in words when the image cannot be seen. It helps, for example, when someone uses a screen reader or an image fails to load.

The short answer: Decide whether the image provides information, performs an action or is decorative. Then write what is needed in the context of the surrounding text. Include detailed chart data in the article itself as well. The scenarios below are fictional examples created for this guide.

The same photo can need different descriptions

Imagine a photo of someone carrying a red umbrella along a rainy sidewalk. In an article about umbrella colors, “A person carrying a red umbrella on a rainy sidewalk” includes a useful detail. In an article about puddles on the sidewalk, the position of the puddles and other information relevant to that article take priority.

Instead of listing everything visible, ask what a reader would miss if the image disappeared. If nearby text already communicates the same information fully, and the image adds no other information or function, the image may be treated as decorative.

Choose wording based on the image’s role

  • Informative photo: A photo showing the result of a recipe might say “Two bread rolls with browned tops,” if that detail matters in context. Keep the relevant information brief and do not infer details that are not visible.
  • Image used as a link or button: A search button containing only a magnifying-glass icon should say “Search,” not “Magnifying glass.” Describe what the action does rather than its appearance. If the same link already contains the word “Search,” the icon can have empty alt text to avoid repetition.
  • Decoration: For a pattern that adds visual style but no information or function, use alt="" on the HTML image element. This is different from omitting the attribute; do not put a space between the quotation marks.
  • Images containing text: Do not leave important information such as dates only inside an image: also put it in ordinary text in the article. Necessary text that appears only in the image should be conveyed in its alternative text.
  • Charts and complex diagrams: Briefly identify the type of image and its key point in the alt text; put detailed values and trends in the article or a table.

Worked example: describing a fictional chart

Suppose a bar chart shows 20 fictional event registrations in April and 30 in May. Its alt text could say “Event registrations increased from April to May,” while nearby text or a table gives the figures: “April: 20; May: 30.” These numbers are illustrative, not results from a real study.

Check that someone reading without the image can understand both the increase and the actual values, and that someone viewing the image can check the same data. Consider the conclusion the chart is meant to communicate, as well as its numbers.

Set alt text in the WordPress Image block

  1. In the post or page editor, select the Image block and open the settings sidebar.
  2. Consider the image’s role and enter the necessary information in “Alternative text.” For a purely decorative image, select “Mark as decorative” if it is available. Screens and labels vary by version.
  3. Preview the image in context. Check that the explanation is not repeated unnecessarily and that chart values are not missing.
  4. If possible, navigate images and links with a screen reader to see whether the action names make sense on their own. Check the actual page after publication as well.

WordPress documentation says alternative text set in the Image block applies to that image in that post, while alternative text set in the Media Library becomes the default when inserting it elsewhere. Check each use in context, even if it is the same photo.

Final checks

  • Does the text convey the meaning or action needed on this page, rather than just the image’s appearance?
  • Is important information left only inside an image? Are detailed chart values available in the text or a table?
  • Did an image marked decorative actually contain information or explain a link destination?
  • Alt text alone does not establish the accessibility of the whole page. Check text readability, keyboard operation and other requirements separately.

Official sources

日本語で読む →

Similar Posts