How to Write Alt Text That Passes WCAG (With 20 Examples)

Good alt text says what the image is for in that spot on the page, in a short phrase, without starting "image of". Images that carry meaning need a text alternative. Purely decorative images get an empty alt attribute (alt="") so screen readers skip them. This is what WCAG 1.1.1 Non-text Content requires, and the examples below show what passes and what does not.

Alt text is judged by a person. Automated tools can check that an alt attribute exists, but not whether the words are right.

What does WCAG require for alt text?

WCAG 1.1.1 Non-text Content (Level A) says that non-text content that is presented to the user has a text alternative that serves the equivalent purpose. There are exceptions for decorative images, and different treatment for controls, time-based media, tests, sensory experiences and CAPTCHAs.

Two related criteria matter:

WCAG sets no character limit. Many writers aim for a short phrase or one sentence, and some screen readers handle very long alt text poorly. Use a longer description elsewhere when an image needs one.

What is the basic test for alt text?

Ask: if the image disappeared, what would a reader miss, and what words would replace it in this context?

The same photo can need different alt text in different places. A photo of a chef is described one way in a restaurant's "Meet the team" page and another way in a news story about an award.

How do you write alt text, step by step?

  1. Decide the image's job. Informative, decorative, functional (a link or button), text, or complex.
  2. Write what matters in this context. Not everything you can see.
  3. Keep it short. A phrase or a sentence.
  4. Leave out "image of", "picture of" and "photo of". Screen readers already announce an image.
  5. Do not repeat nearby text. If a caption says it already, use short alt text or none.
  6. Test with a screen reader or by reading the alt text aloud without the image.

When should alt text be empty?

Use alt="" when an image adds no information:

<img src="divider.svg" alt="">

An empty alt is not the same as a missing alt. If the attribute is missing, some screen readers read the file name. Always include the attribute.

What are 20 examples of good and bad alt text?

#Image and contextBad alt textGood alt text
1Photo of a product, a blue ceramic mug, on a shop pageimage1.jpgBlue ceramic mug with a wide handle
2Product photo, where the name is already in the heading beside itMug mug mug blue ceramic cheap mugBlue ceramic mug, front view
3Staff photo on a team page, Priya Rao, designerPhotoPriya Rao, designer
4Decorative wave pattern behind a headingBlue wave patternalt="" (empty alt)
5Logo that links to the home pageLogoAcme home
6Logo in the page footer, not linkedImage of Acme logoAcme
7Magnifying glass icon on a search buttonMagnifying glassSearch
8Shopping cart icon linkCart iconCart, 3 items
9Social media icon linkIconFollow us on LinkedIn
10Icon next to the visible text "Download PDF"PDF iconalt="" (empty, the text already says it)
11Banner with the text "Summer sale, 20% off"BannerSummer sale: 20% off all sandals
12Bar chart showing sales by quarterChartBar chart: sales rose each quarter, from 120 in Q1 to 210 in Q4. Data table below.
13Map showing a shop locationMapMap showing the shop on Station Road, two blocks east of the bus stand
14Screenshot of a settings page in a tutorialScreenshotSettings page with the "Notifications" toggle switched on
15News photo of a flood, in an article about the floodFloodResidents wade through knee-deep water on a flooded street
16Infographic with many stepsInfographic about recyclingRecycling steps: rinse, sort, place in the right bin. Full steps listed below.
17Photo in a gallery, with a visible captionBeautiful sunset over the seaSunset over the harbor (or empty, if the caption says the same)
18Image used as a "Submit" buttonbutton.pngSubmit
19Author avatar next to a visible author nameAvataralt="" (empty alt)
20Photo of a recipe result, in a recipe postDelicious!!!Finished lentil soup in a white bowl, topped with parsley

Context changes the answer, so treat these as models and not rules.

When an image is the only content of a link or button, the alt text should describe where it goes or what it does, not what it looks like.

<a href="/cart">
  <img src="cart.svg" alt="Cart, 3 items">
</a>

If a link contains both an image and text, and the text already says it, leave the image's alt empty to avoid repeating:

<a href="/report.pdf">
  <img src="pdf-icon.svg" alt="">
  Download the annual report (PDF)
</a>

How do you handle charts, graphs and complex images?

A short alt text cannot hold a whole chart. Use two layers:

  1. Short alt text that names the image and its main point.
  2. A longer description or the data in the page text, a table or a linked page.
<figure>
  <img src="sales.png" alt="Bar chart: quarterly sales rising from 120 to 210. Details in the table below.">
  <figcaption>Quarterly sales, 2026</figcaption>
</figure>
<table>
  <!-- data table here -->
</table>

How do you handle images of text?

If an image contains text, put the same text in the alt text, and ask whether you can use real text instead (1.4.5). Logos are an allowed exception.

What about SVG and CSS background images?

<svg role="img" aria-label="Warning" width="16" height="16">...</svg>
<svg aria-hidden="true" width="16" height="16">...</svg>

What mistakes should you avoid?

How do you check alt text on a site?

  1. Run an automated scan to find missing alt attributes. See the best free accessibility testing tools.
  2. Review alt text by reading it aloud without the image. Does it make sense in context?
  3. Test key pages with a screen reader.
  4. Add alt-text guidelines for editors, and check new uploads.

An automated audit cannot tell whether alt text is accurate or useful. Kerbwise audits the page you have open against WCAG 2.2 Level A and AA and ranks accessibility issues by severity, with the WCAG number, who is affected and how to fix each one, but alt text quality still needs a human review. See how to run a website accessibility audit for the full process, and the WCAG 2.2 AA checklist for every criterion.

Try Kerbwise on a page you own

Try Kerbwise ($29 one-time) to run this audit locally and export a client-ready PDF report. Get it on the Chrome Web Store or read more on the Kerbwise page.

Frequently asked questions

How long should alt text be?

WCAG sets no limit. Aim for a short phrase or a sentence. Put long descriptions in the page text and link or refer to them.

Should I start alt text with "image of"?

No. Screen readers already say that it is an image, so the words add noise.

What should I put as alt text for decorative images?

Use an empty alt attribute, alt="", so screen readers skip the image.

Do I need alt text for logos?

Yes, unless the logo is decorative in context. A logo that links home needs alt text that describes the destination, such as "Acme home".

Does alt text help SEO?

It can help search engines understand an image, but write for people first. Keyword stuffing makes alt text worse for screen reader users.

Get Kerbwise for Chrome | Kerbwise | Yuktix Labs home