Images & Alternative Text
To ensure website accessibility, all images, graphs, and diagrams must have alt text. Purely decorative images — such as some decorative iconography — use an empty alt text attribute (alt=""
), but content managers will never use purely decorative images.
When writing a text alternative for an image or graphic, think about the role the image plays on the page. Your description should sufficiently describe what is being presented in as few words as possible. Alt text needs to convey the same information as the image in the given context.
The following guidelines outline the properties of effective alt text:
- A clear, succinct description of the image (keep the explanation brief). The description shouldn’t exceed a short sentence or two. Ideally, the description should be less than 100 characters because some screen readers will not read after 125 characters.
- No need to provide every tiny detail in the image. In most cases this is not necessary, and can become verbose.
- Don’t start alt text with “Image of,” “Photo of,” or something similar. Screen readers will identify images by default, so it would be repetitive.
- Include a period at the end of the alt text. The period allows the screen reader to pause after the last word in the alt text.
- Complex images like graphs, charts, diagrams, maps, and illustrations, frequently require longer descriptions. Following are some ways to add a longer text description for complex images:
- Add description as a caption for the image.
- In addition to the brief alt text description, add the detailed description in the surrounding web page text.
- Link to a separate web page to provide the longer description.
Adding and Updating Alt Text in WordPress
There are a few ways to add alt text in WordPress:
- When Adding an Image.
- In the Block Sidebar Settings.
- From the Media Library.
When Adding an Image
It’s easiest to add alt text when initially uploading or adding an image.
- After uploading an image, the image details will appear in the media library window under the Attachment Details heading.
- Locate the Alt Text field and enter your alternate text for the image, with a period at the end. The Media Library will automatically save the alt text.
- You can now insert the image anywhere on the site and the alt text will be automatically filled in.
In the Block Sidebar Settings
You can edit existing alt text or add missing alt text directly from the page or post edit screen.
If using the block editor:
- Select the image you want to edit and look for the Image settings panel in the block sidebar settings.
- Add your alt text in the Alt Text field.
If using the classic editor:
- Select the image to bring up the image editor toolbar, then select the edit icon (designed to look like a pencil) to open the Image Details window.
- Locate the Alternative Text field and enter your alt text for the image, with a period at the end. Make sure to save your changes with the Update button.
From the Media Library
You can add alt text to images directly from the Media Library (accessed via the primary navigation menu in the WP admin area).
- Select any image to open its attachment details window.
- Locate the Alt Text field, and enter the alt text for the image. It will save automatically.
Important: Adding alt text from the Media Library will only apply the new alt text to images inserted into pages from that point on. Any images added to a page before the alt text was created will not include the new alt text. You will have to manually update those.