Why does my report flag images missing alt text?
Your report lists images on your site that have no alt text, and you want to add alt text to images in WordPress. Alt text is a short written description of an image, stored with the image in your page’s code. Visitors who use a screen reader hear it read aloud, and search engines read it to understand what the picture shows.
Why does it matter?
Some of your visitors are blind or have low vision and browse with a screen reader, software that reads the page out loud. When an image has no alt text, the screen reader skips it or reads out the file name, something like “IMG underscore 4471 dot jpeg”. If that image is a photo of your team, a map to your shop or a button, those visitors miss it. Alt text is also part of the main web accessibility standard (WCAG, success criterion 1.1.1). Search comes second: Google says it uses alt text, along with the page around the image, to understand what an image shows, and that helps your images appear in Google Images.
How do I write good alt text?
A few examples for a gutter cleaning company at
example.com:
| Image | Weak alt text | Better alt text |
|---|---|---|
| A worker on a ladder clearing leaves from a gutter | gutter | Technician clearing leaves from a house gutter |
| The company logo in the header, linked to the homepage | logo | Example Gutters home |
| A before-and-after photo of a downspout | before after photo gutter cleaning best gutter cleaning service | Clogged downspout beside the same downspout after cleaning |
When should an image have empty alt text?
Some images are only decoration: a background texture, a divider line, a stock photo that adds mood and no information. Those should have empty alt text, so the screen reader passes over them quietly. The same goes for an image whose meaning is already in the text right next to it, such as an icon beside the words “Call us”.
Empty is different from missing. Empty alt text tells the screen reader “skip this on purpose”. Missing alt text leaves the screen reader guessing, and it often reads out the file name. In WordPress, leaving the alt text field blank gives an image empty alt text, so decide image by image which ones need a description.
An image that is the only thing inside a link always needs alt text. Describe where the link goes, as in the logo example above.
How do I add alt text to images in WordPress myself?
There are two places to add it. They do different jobs, so read both.
- The media library stores alt text with the image file. WordPress copies it in each time you add that image to a page from then on.
- The block editor holds the alt text for an image placed in a page’s content. That image keeps the alt text it had when it was placed, even if you change it in the media library later.
- Featured images and your site logo read their alt text from the media library each time the page loads. The block editor has no alt text field for them.
For images in a page’s content, fix the alt text in the block editor. For featured images and the logo, fix it in the media library.
Add alt text to an image already on a page
-
Log in to your WordPress dashboard, usually at example.com/wp-admin (with your domain in place of example.com)
-
Go to Pages, then All Pages (or Posts, then All Posts)
Hover over the page your report names and click Edit.
-
Click the image once to select it
-
Open the settings sidebar if it's closed
click the square Settings icon at the top right of the editor. Make sure the Block tab is selected.
-
Find the Alternative text field in the sidebar and type your description
Leave it blank only if the image is decoration.
-
Repeat for each image on the page, then click Update (or Save) at the top right
Images inside a gallery. Click the single image inside the gallery block to select it, then follow steps 4 to 6 for that image.
Add alt text in the media library
Do this for images you will place on new pages, so the alt text is there from the start.
- In the dashboard, go to Media, then Library.
- Click an image to open its Attachment details.
- Type your description in the Alternative Text field. WordPress saves it as you type.
- Close the panel and move on to the next image.
This doesn’t change images already placed in a page’s content. Fix those in the block editor as above. It does update featured images and the logo.
What does done look like?
- Open the page in a private browser window and view its source:
Ctrl+U on Windows, or Option+Command+U
in Chrome on a Mac. Search the source for the image’s file name. On the
same line you should see
alt="followed by your text, oralt=""for a decorative image. - If you still see the old version, your site may be showing a saved copy of the page. Check again in a few minutes. If it hasn’t changed, reply on your ticket and we’ll help.
- For a second check, open the page in Chrome, right-click, choose
Inspect, open the Lighthouse tab and
run an Accessibility report. When every image has an
alt attribute, the report no longer lists “Image elements do not have
[alt]attributes”. Lighthouse can’t judge whether your words describe the image well, so step 1 and your own read of the descriptions are the real test. - The next audit no longer flags the images you described.
If you’d rather we handle it
Reply on your ticket and we’ll take care of it. Tell us anything we should know about your images, such as people’s names or what a product photo shows, and we’ll write and add the descriptions.
Want us to handle it?
Reply on your ticket and we'll take care of it.
If you get stuck
If you get stuck, reply on your ticket and we’ll help.