WCAG fix guide

How to Add Alt Text in WordPress (WCAG 2.2)

Last reviewed 8 min read

Applies to: SC 1.1.1 Non-text Content, Level A · WordPress block editor (Gutenberg), block themes and the Media Library

Missing alt text was found on 53.1% of home pages in the WebAIM Million 2026 (detected with WebAIM's WAVE tool). 45% of images missing alt text were linked images, which leaves those links without a name (WebAIM).

This is the WordPress deep dive. For what good alt text says in the first place, start with the main guide, How to fix missing alt text, or the W3C alt decision tree.

First, the one thing that trips people up

WordPress stores alt text in two places:

So setting alt text in the Media Library does not fix images already placed in existing posts. The WordPress docs describe the split: block alt text "only applies to the image on that specific page or post", while Media Library alt text "sets the default alt text when you insert the image elsewhere" (Image block docs). After a Media Library clean-up, open the posts that use those images and check them.

Media Library

  1. Go to Media › Library and click an image to open Attachment details.
  2. Fill in Alt Text. WordPress describes it as the text "used for accessibility" (Media Library docs).
  3. Title, Caption and Description are separate fields. The title is not read out as alt text, and a filename is not alt text.

You can also edit alt text from Media › Library › Edit more details (the Edit Media screen) (Edit Media docs).

Image block (block editor)

  1. Select the Image block.
  2. Open Block settings (the sidebar; click Settings next to Save/Publish if it's hidden).
  3. Under Alternative text, describe the image's purpose, or choose Mark as decorative if it adds no information (Image block docs).

The block's crop/edit screen also has a Details tab with an Alt text field ("leave empty if the image is decorative").

Linked images: if the image links somewhere (a button-like banner, a "shop now" image), the alt text should describe the destination or action, e.g. alt="Shop the winter range", not how the image looks.

Featured images are set in the post's settings sidebar (the Featured image panel), or from an Image block's More options › Set as featured image (Image block docs). There is no separate alt field for the featured image in the post sidebar. Depending on your theme and template, the featured image either uses the image's Media Library alt text or gets its text from somewhere else (see the Post Featured Image note below), so always check the front end.

Galleries

Each image in a Gallery block is its own Image block (Gallery block docs). Select each image inside the gallery and set its alt text in the Image block settings. Galleries make alt text easy to miss, because images can be added in bulk.

Decorative images

Use an empty alt (alt="") for images that add nothing: dividers, background textures, stock photos that only set a mood. In the Image block, use Mark as decorative, which WordPress says to use "only when it does not add meaningful information or functionality" (Image block docs). Be careful with blank fields: depending on your WordPress version and theme, an image whose alt field was simply left empty can be output with alt="", the same as a decorative image. A scanner then treats it as decorative and won't flag it. That makes a manual pass over informative images important even when a scan is clean. Check the page HTML if you're unsure.

Decorative means no information, not unimportant to you. A product photo, chart or photo of a named person isn't decorative.

Logos and other theme images

WooCommerce product images

WooCommerce product and gallery images are Media Library images, so set alt text on each one in the Media Library. WooCommerce's own docs note that a product video poster image needs alt text, and that without it WooCommerce falls back to the video's title (WooCommerce docs). Describe what distinguishes each product photo (colour, angle, detail), not just the product name repeated.

Page builders, sliders and other plugins

Page builders, slider plugins and gallery plugins often output images through their own widgets. Some read the Media Library alt text, some have their own alt field, and some output none at all. For each plugin you use:

Menu names can change between platform versions (steps checked November 2026). If a path doesn't match, check your platform's current help pages. Page builder and plugin menus vary, so check each plugin's own docs.

WordPress and WooCommerce are trademarks of their respective owners. Glimscope is not affiliated with or endorsed by either of them.

What automated tools can and can't tell you: Automated checkers (including axe-core, which our monitor uses) can flag many instances of this issue, but they cannot judge everything. A human still has to check meaning and context. For scale: Deque reports that in its own sample of first-time audits, its automated tests found 57.38% of issues by volume (Deque report). That is Deque's figure for its sample, not a detection rate for any one tool, and it means a large share of issues still needs manual testing. A scanner can tell that an alt attribute is missing. It cannot tell whether existing alt text is accurate, or whether an image marked decorative really is. Automated tests find only some accessibility issues; manual testing is still required. Not legal advice. More on this: What automated accessibility testing can and can't catch.

Manual checklist

Sources

  1. www.w3.org/WAI/WCAG22/Understanding/non-text-content.html
  2. webaim.org/projects/million/
  3. www.w3.org/WAI/tutorials/images/decision-tree/
  4. wordpress.org/documentation/article/image-block/
  5. wordpress.org/documentation/article/media-library-screen/
  6. wordpress.org/documentation/article/edit-media/
  7. wordpress.org/documentation/article/post-featured-image-block/
  8. wordpress.org/documentation/article/cover-block/
  9. wordpress.org/documentation/article/gallery-block/
  10. wordpress.org/documentation/article/site-logo-block/
  11. woocommerce.com/document/adding-product-images-and-galleries/
  12. www.deque.com/automated-accessibility-coverage-report/

Check your own site

Run a free automated scan of one page, on your own site or a client's site you're authorised to test. You get a dated PDF and a report link (kept for 30 days) you can forward.

Run a free automated scan

Automated tests find only some accessibility issues; manual testing is still required. Not legal advice.