Alt text is the short description of an image stored in the alt attribute of the img element, and it is the single highest-impact accessibility fix most websites can make. Screen readers read it aloud to blind and visually impaired visitors, browsers display it when an image fails to load, and search engines rely on it to understand what an image shows. It is also a legal matter: WCAG success criterion 1.1.1 requires a text alternative for all non-text content at conformance level A, the minimum level, and laws like the European Accessibility Act build on exactly these criteria. The good news is that writing alt text well is a skill of minutes, not weeks. The rules fit on an index card: describe what matters about the image in its context, keep it to about one concise sentence, skip phrases like image of, give purely decorative images an empty alt attribute, and never leave the attribute out entirely. This guide walks through each rule with examples, shows where alt text lives in WordPress and ends with how to find every image on your site that is still missing one.
What is alt text and who depends on it?
In the HTML source, alt text is an attribute on the image element:
<img src="lighthouse.jpg" alt="Red and white striped lighthouse on a rocky coast at sunset">Three audiences consume it, and thinking about them explains almost every rule that follows. Screen reader users hear the alt text in place of the image, so for them it simply is the image. Roughly 2.2 billion people worldwide live with some form of vision impairment according to the WHO, and screen readers are how a substantial share of them browse. Browsers show the text when the image cannot load, which still happens daily on slow connections and broken deployments. And search engine crawlers, which cannot see images the way humans do, use the alt attribute as their primary textual signal for image content.
The formal requirement comes from WCAG success criterion 1.1.1 Non-text Content. It sits at conformance level A, which means a site without text alternatives fails the lowest bar of accessibility conformance, regardless of how well everything else is done.
How to write good alt text: five rules that cover almost everything
Alt text is writing, and like all writing it improves with a few constraints. These five carry you through nearly every image:
- Describe content and purpose, not pixels. Ask what the image communicates in this context, then say that. The same photo of a person at a laptop might be Support agent answering customer chats on a support page and Working from a kitchen table on a remote-work article.
- Be specific, but stop at relevant. Dog says less than Golden Retriever puppy chasing a ball across a lawn. But if the article is about lawn care, the breed may matter less than the chewed-up grass.
- Keep it to about one sentence. A widely used guideline is around 125 characters, a convention from older screen readers that split longer text into chunks. It is not a hard limit, but it is a good forcing function for concision. Front-load the important words.
- Skip image of and photo of. Screen readers already announce the element as an image, so those phrases are pure repetition. Saying the type adds value only when it matters: painting of, screenshot of and chart of orient the listener.
- For linked or functional images, describe the destination or action. A logo that links to the homepage should say Company name, homepage, not describe the logo artwork. An icon button that submits a search should say Search. Function beats appearance whenever an image does something.
One special case deserves its own sentence: images that contain text. WCAG discourages text baked into images in the first place, but where it exists, for example in a promotional banner, the alt text must include that text, because it is invisible to everyone relying on the alternative.
Good and bad alt text: examples compared
| Image | Weak alt text | Good alt text |
|---|---|---|
| Product photo in a shop | shoe | Blue Nike Air Zoom running shoe, side view |
| Team photo on the about page | IMG_4032.jpg | The five-person InspectWP team in front of the Hamburg office |
| Chart in a blog post | chart | Bar chart: page load time drops from 4.2 to 1.8 seconds after caching |
| Logo linking to homepage | logo-final-v3 | ExampleCorp, back to homepage |
| Decorative divider ornament | decorative swirl graphic element divider | (empty alt attribute) |
Notice the pattern in the weak column: file names, single words and descriptions of pixels instead of meaning. The chart row shows the biggest gap. For a screen reader user, chart conveys nothing, while a one-line summary of the finding replaces the entire visual. If a chart is too complex for one line, summarise the key takeaway in the alt text and provide the full data as a table nearby.
Decorative images: when empty alt text is correct
Not every image carries meaning. Ornamental dividers, abstract background shapes and stock photos that only add mood are decoration, and the correct markup for them is an empty alt attribute:
<img src="divider-ornament.svg" alt="">The empty attribute is a deliberate signal that tells screen readers to skip the image entirely, which is exactly what a sighted visitor effectively does. This is very different from omitting the attribute: with no alt attribute at all, many screen readers fall back to announcing the file name, and the visitor gets graphic slash divider dash ornament dash final dash v2 dot svg read aloud mid-sentence. That is why accessibility checkers flag missing alt attributes as errors while treating empty ones as valid. The W3C offers a handy alt decision tree for the honest borderline cases.
A pragmatic test for is this decorative: imagine the image gone. If the page loses no information and no function, empty alt is right. If anything meaningful disappears, describe it.
How to add alt text in WordPress
WordPress gives every image an alt text field, and it takes three clicks to reach:
- In the block editor: select the image block, and the Alternative Text field appears in the block settings sidebar under Settings. This is the value that ends up in the page HTML.
- In the media library: open any image and fill the Alternative Text field in the attachment details. This value is used as the default when the image is inserted somewhere in the future.
- For featured images: the alt text comes from the media library value of that image, so post thumbnails inherit whatever is stored there.
One WordPress quirk is responsible for a lot of confusion and deserves a highlighted warning: updating the alt text in the media library does not change images that are already placed in posts. The block editor copies the alt text into the post content at insertion time, and from then on the copy is independent. If you fix alt texts in the media library and wonder why the pages did not change, that is why. Existing placements have to be edited in the posts themselves, or with a search-replace tool if the scale demands it.
While you are in the media workflow: the alt text field is not the title field and not the caption. The title is mostly internal, the caption is visible text below the image, and only the alt attribute serves screen readers and crawlers. Filling the wrong field is the most common way sites end up with pretty captions and empty alt attributes.
Alt text and SEO: what Google actually says
Google's image SEO documentation is unambiguous: descriptive alt text is a ranking factor for Google Images and helps Google understand both the image and the page around it. For shops and content sites, image search is a real traffic channel, and the alt attribute is its most direct lever. The same document contains the equally unambiguous warning: stuffing alt attributes with keywords results in a negative user experience and may cause your site to be perceived as spam.
The practical translation: write the alt text for the listener first, and if the page's topic naturally belongs in the description, include it once. Blue Nike Air Zoom running shoe, side view is good alt text that happens to contain the words a shopper would search for. running shoes buy cheap running shoes best running shoes 2026 is spam wearing an alt attribute. Descriptive file names (running-shoe-blue.jpg instead of IMG_4032.jpg) and surrounding text that matches the image round out the picture, but alt text remains the strongest signal you fully control.
How to find images without alt text on your site
Writing good alt text starts with knowing where it is missing, and there are tools for every scale. For a single page, the browser can answer it directly: open the developer tools console and run a one-liner that lists every offender.
// Lists all images without an alt attribute on the current page
document.querySelectorAll('img:not([alt])').forEach((img) => console.log(img.src));For page-by-page auditing with visual feedback, the free WAVE tool by WebAIM marks every missing and suspicious alt attribute directly on the rendered page, and Lighthouse in Chrome includes the check in its accessibility audit. The scale of the problem is well documented: the annual WebAIM Million analysis of the top one million homepages finds missing alt text among the most common accessibility failures year after year, on roughly half of all homepages tested. Whatever you find on your own site, you are in large company, and unlike most accessibility issues this one is fixed image by image, in minutes.
How InspectWP checks your alt texts
An InspectWP report counts the images on an analysed page and reports, in the SEO section, how many carry an alt attribute and how many are missing one, flagging the misses as a warning. That gives you the missing-alt inventory for a WordPress site without opening the developer tools, and because reports can run on a schedule, it also catches the regressions that inevitably happen when new content is published in a hurry. Combine the report's count with the writing rules from this guide, and the path is short: find the images, describe what matters, leave decoration silently empty, and both your screen reader users and your image search traffic collect the benefit.