How to Write Alt Text for Images (With Real Examples)
Missing or inadequate alt text is consistently among the top three failures in every accessibility scan we run. Not because the concept is hard — it isn't — but because most explanations skip the nuance that separates alt text that genuinely helps screen reader users from alt text that technically “exists.” This guide covers the whole picture: the decision of whether to write alt text at all, what to actually say, what to avoid, and how to verify it works at scale.
What Is Alt Text and What Does WCAG Actually Require?
Alt text is the value of the alt attribute on an image element. When a screen reader encounters an image, it reads the alt text aloud. When an image fails to load, the alt text appears in its place. When a search engine crawler indexes your page, the alt attribute is its primary signal for what the image contains or represents.
Under WCAG Success Criterion 1.1.1, every non-decorative image must have a text alternative that serves the same purpose as the image. That “same purpose” phrasing is load-bearing: WCAG is not asking you to describe pixels. It is asking you to convey the meaning or function the image provides to a sighted user.
It is a Level A requirement — the baseline, not the ceiling. And yet it is routinely the single most common automated finding in accessibility audits, because most content management systems make it trivially easy to upload an image and move on without filling in a field that only affects users you can't see.
One honest caveat worth stating upfront: automated scanners, including CompliaScan (which runs on axe-core), can reliably detect images that are missing the alt attribute entirely or that have obviously placeholder values like filenames. Whether your alt text is meaningfulis a human judgment call. Automated tools catch roughly 30–40% of WCAG issues — the presence of an alt attribute is in that detectable range; the quality of what you wrote is not. That distinction matters for how you staff a full accessibility audit.
The First Question: Does This Image Even Need Alt Text?
The advice to “always write alt text for every image” is well-meaning and wrong. Alt-texting a decorative image — a background texture, a purely aesthetic divider, a stock photo that adds nothing to the surrounding paragraph — makes the screen reader experience worse, not better. The user has to sit through a description of something that conveys no information.
The correct handling for a purely decorative image is an empty alt attribute (written as alt=""). This tells assistive technology to skip the image entirely. Omitting the alt attribute altogether is notthe same thing — it is an error, and screen readers typically fall back to announcing the filename.
Ask yourself one question: if this image were invisible, would a reader miss any information the page is trying to communicate? If yes, write alt text. If no, use an empty alt attribute.
- Decorative image: empty alt attribute — present but blank
- Informational image: describe what the image communicates, not merely what it shows
- Functional image (button or linked icon): describe the action or destination, not the visual (“Search” rather than “magnifying glass icon”)
- Complex image (chart, infographic, diagram): a short alt attribute plus a longer description placed nearby or linked
- Image of text: include the exact text in the alt attribute — or, better still, replace the image with real HTML text
Five Rules That Produce Good Alt Text
Once you've established that an image warrants a description, these rules separate useful alt text from noise:
- Skip “image of” and “photo of.” Screen readers already announce that the element is an image. Starting with “Image of a dog” wastes the first words on redundant framing.
- Be specific but proportional. “Tabby cat sitting on a blue windowsill” is better than “cat.” It is also better than a 50-word essay. Match the level of detail to the image's role on the page.
- For interactive elements, describe the function, not the appearance. A linked logo should read as its destination: “CompliaScan home page,” not “teal circular logo with white text.”
- Convey the information, not just the content. A bar chart's alt text should summarize its key finding (“Bar chart: mobile traffic exceeded desktop in Q3 2025”), with a linked data table for users who need the full numbers.
- Test it out loud. Read your alt text aloud without looking at the image. Would you understand the page? Could you act on a call to action? If not, revise.
The Alt Text Mistakes Nobody Warns You About
The textbook errors — missing alt attributes, raw filenames as alt text — get caught by automated WCAG scanning. The subtler mistakes do not.
- Writing alt text for every image regardless of purpose. As covered above, decorative images should have empty alt. A description like “decorative blue background swoosh” adds friction for screen reader users without adding value.
- Repeating the surrounding caption or heading verbatim. If the caption already reads “Our team at the 2025 design summit,” identical alt text makes a screen reader user hear the same sentence twice. A supplementary detail or empty alt is often more appropriate.
- Keyword-stuffing alt text for SEO. Anyone who tells you to load your target keywords into every alt attribute is selling you something. Search engines flag it, and it degrades the experience for the very users alt text exists to serve.
- Treating alt text as a one-time task. The same image reused across pages and contexts may need different alt text in each. A product photo on a product detail page (“12 oz ceramic mug, navy blue, matte finish”) needs different alt text than the same image used decoratively in a homepage banner (empty alt).
- Skipping complex images entirely. Charts, graphs, maps, and infographics are the most information-dense elements on a page and the most frequently left blank. A one-line alt attribute is not enough — pair it with an adjacent data table or linked long description.
Alt Text in WordPress, Shopify, Wix, and Other CMSes
Every major CMS exposes an alt text field. All of them make it easy to skip. The shared failure pattern is identical everywhere: someone uploads an image in a hurry and moves on, because the page still looks fine to them. The default behavior in most platforms is to substitute the filename — which gives you alt text like IMG_4821.jpg or hero-banner-final-v3.png. That is not alt text. It is a placeholder sitting in the right attribute.
WordPress stores alt text separately from the image file, so the same image can carry different alt text in different posts — which is a feature, and worth using. Shopify provides per-image alt fields in the media library and on product variants, but the field is optional and often blank. Wix, Squarespace, and Webflow all expose the setting, usually buried in an image panel that most users only open to crop.
The highest-leverage move on any CMS is to fix alt text at the template level first. If your site generates pages from a repeating template — product pages, blog posts, event listings — enforcing alt text at content-entry time can resolve the issue across hundreds of pages simultaneously. A template that repeats broken alt text also repeats fixed alt text. That is the same reason a single WCAG scan finding on a product template is worth treating as urgent rather than low-priority.
Finding Alt Text Issues — and Keeping Them Fixed
The fastest way to surface missing or empty alt attributes across your site is an automated scan. CompliaScan's ADA compliance checker reports every image flagged by WCAG 1.1.1, with its element location and the specific criterion it violates, so a developer can fix it without guessing. For a systematic approach to image requirements alongside other criteria, a WCAG checklist gives you a structured starting point.
For larger sites, prioritize by traffic. Your homepage, main product or service pages, and anything ranking prominently in organic search should go first. A fix on a high-traffic product template will often resolve the same violation across an entire catalog at once.
After remediation, alt text degrades. New images are uploaded without descriptions, existing images are repurposed in new contexts, third-party apps inject their own image elements on update. That drift is exactly the kind of regression that continuous accessibility monitoring is built to catch — a re-scan alerts you when a page that previously passed starts failing, before a tester finds it for you.
A note on AI-assisted suggestions: CompliaScan can surface AI-generated alt text recommendations using your own API key (OpenAI, Anthropic, or Google — BYOK, CompliaScan never marks up your costs). Treat these as a first draft. They need review by someone who understands the context and purpose of each image on the page. No tool — AI-powered or otherwise — guarantees compliance, and no generated text replaces the judgment of a person who knows what the image is actually communicating.
See your lawsuit risk in 30 seconds
Over 5,100 ADA website lawsuits were filed in 2025 — a 20% year-over-year increase. Scan your site now and know exactly how exposed you are before a plaintiff's firm runs the same check.
Free scan · No signup required · Results in ~30 seconds
Keep reading
All articles →Shopify Accessibility: Is Your Store ADA Compliant?
Shopify gives you accessible building blocks — but your theme, apps, and content decide whether your store is ADA compliant. Where Shopify stores fail WCAG, and how to fix it.
Wix Accessibility: Is Your Wix Site ADA Compliant?
Wix has solid accessibility tools built in — but your template, apps, and content decide whether your site actually passes WCAG. Where Wix sites fail, and how to fix them.
WordPress Accessibility: How to Make Your WordPress Site ADA Compliant
WordPress powers 43% of the web and is a top target for ADA lawsuits. Learn which themes, plugins, and builders break accessibility — and how to fix them.