← Back to Accessalyze

By Genesis AI Services · April 21, 2026 · 6 min read · Images & Alt Text

How to Add Alt Text to Images

Quick rule: Every <img> must have an alt attribute. Informational images need a description. Decorative images get alt="". Icons with meaning need alt text. Linked images need to describe the destination.

WCAG success criterion 1.1.1 requires non-text content to have a text alternative. Missing alt text is the most common WCAG violation — affecting around 58% of websites. For blind users who rely on screen readers, an image without alt text is invisible and meaningless.

The Basic Syntax

<img src="path/to/image.jpg" alt="Description of the image">

The alt attribute goes directly on the <img> element. There is no separate tag or workaround — alt is the correct and only mechanism for simple images.

See how 321 websites scored →

View the 2026 Report

Types of Images and What to Write

1. Informational Photos

Describe what the image shows — the content that matters, not the aesthetic.

<img src="team.jpg" alt="image">
<img src="team.jpg" alt="photo of team">
<img src="team.jpg" alt="The Accessalyze team of five engineers at their April 2026 offsite">

2. Charts and Data Visualizations

Convey the data insight, not just what type of chart it is.

<img src="revenue-chart.png" alt="chart">
<img src="revenue-chart.png" alt="Bar chart showing revenue grew from $40K in Q1 2025 to $56K in Q1 2026, a 40% increase">

For complex charts, also provide a <details> element or a linked data table with the full dataset.

3. Decorative Images

Images that add visual flair but convey no information should use an empty alt attribute so screen readers skip them entirely.

<img src="decorative-wave.svg" alt="">

Never omit the alt attribute entirely on a decorative image — some screen readers will read the filename instead.

4. Icons With Meaning

If an icon communicates something (a warning, a status, a category), it needs alt text.

<img src="warning-icon.svg">
<img src="warning-icon.svg" alt="Warning:">

If the icon is beside visible text that explains it, make the icon decorative: alt="".

5. Linked Images (Image Inside an Anchor)

When an image is inside a link, the alt text should describe the link destination, not the image appearance.

<a href="/about"><img src="team.jpg" alt="Team photo"></a>
<a href="/about"><img src="team.jpg" alt="About our team"></a>

6. Image Buttons and Submit Buttons

<!-- FAIL: no alt -->
<input type="image" src="submit-btn.png">

<!-- PASS: describes button action -->
<input type="image" src="submit-btn.png" alt="Submit the registration form">

7. CSS Background Images

Background images applied with CSS cannot have alt text and are automatically treated as decorative. If a background image conveys information, it must be moved to an <img> element with proper alt text.

Alt Text Do's and Don'ts

For Complex Images: aria-describedby

When a brief alt text cannot adequately describe a complex image (a diagram, infographic, org chart), use aria-describedby to point to a visible or hidden extended description:

<img src="accessibility-audit-flow.png"
     alt="Accessibility audit workflow diagram"
     aria-describedby="audit-flow-desc">

<p id="audit-flow-desc">
  The workflow starts with automated scanning, moves to manual keyboard
  testing, then screen reader testing, then a remediation sprint, and
  ends with a re-scan to verify fixes.
</p>

Testing Your Alt Text

Find Missing Alt Text Across Your Entire Site

Accessalyze scans every page and flags every image missing or potentially inadequate alt text. Free, instant results.

Scan for Alt Text Issues →

← Back to Accessalyze · ← How to Check ADA Compliance

Accessalyze - Free WCAG 2.1 scanner that writes the fix code for you | Product Hunt

See real website accessibility scores: Browse 244+ free accessibility audits →

Try it yourself

Enter your website URL to get a free accessibility score.

Check your website accessibility score free Scan Now →