How to Fix Missing Image Alt Text for Accessibility

Screen readers can't describe an image unless the page gives it a text alternative. This check fails when any image-like element has no accessible name: plain images, image buttons, inline SVGs or elements marked role="img", image-map areas, or embedded objects. By the end of this guide, every meaningful image will have a description and every decorative image will be marked so assistive technology skips it.

By Updated ⏱ 30–60 minutes for a typical small site🎯 Beginner● High impactAccessibility
Illustration: Images have text alternatives fix guide
ACCESSIBILITY · FIX GUIDE Images have text alternatives IMPACTEFFORT TIME30–60 minutes for a typical small site LEVELBeginner

Why it matters

A blind visitor who reaches an image with no alt hears the file name read aloud, such as "IMG underscore 4821 dot jpg", or nothing at all. On a linked logo or an image button, they can't tell where the control goes. 1, Level A) and is frequently cited in accessibility complaints and demand letters.

Alt text is also the main signal Google Images and AI answer engines use to understand what an image shows, so filling it in improves image search visibility and how your content is summarised.

✕Before<img src="/uploads/IMG_4821.jpg"> (ascreen reader announces "IMG_4821.jpg,image")✓After<img src="/uploads/IMG_4821.jpg"alt="Example Co technician installinga heat pump on a brick wall">

What you need

Edit access to your CMS, theme templates or source code
A list of failing elements from this audit, or the free axe DevTools browser extension
Chrome or Firefox DevTools to inspect elements

Step-by-step fix

1

List every element that fails

Start with the failing elements from your audit report. To see them on the live page, install the axe DevTools extension, open DevTools (F12), go to the axe DevTools tab and run a scan. Each issue points to the exact element.

The check covers six kinds of element:

  • <img> without alt
  • <input type="image"> without alt
  • elements with role="img" that have no name
  • <svg role="img"> without a title or label
  • <area> in image maps without alt
  • <object> without a text alternative
Pro tip: Failures often come from a shared template, such as the header logo or a product card. One fix in the template can clear dozens of pages.
2

Decide: meaningful or decorative?

For each image, ask whether a visitor would lose information if it were gone.

  • Meaningful images (product photos, charts, logos, icons that are the only label on a button) need a description of what they show or do.
  • Decorative images (background flourishes, dividers, a photo whose caption already says the same thing) get an empty alt="".

Keep descriptions short, usually under about 125 characters. Don't start with "image of". For linked images, describe where the link goes, not what the picture looks like.

Pro tip: Use alt="" with no space between the quotes. Leaving the alt attribute out completely is a failure. An empty alt is a deliberate instruction to skip the image.
3

Add alt attributes to img elements

Add an alt attribute to every <img>. For a linked logo, use the company name or the link's destination. For decorative images, use alt="".

Include width and height while you're editing to prevent layout shift.

html
<!-- Meaningful -->
<img src="/images/team.jpg" alt="The Example Co support team at our Leeds office" width="800" height="533">

<!-- Linked logo: describe the destination -->
<a href="/"><img src="/logo.svg" alt="Example Co home" width="140" height="40"></a>

<!-- Decorative -->
<img src="/images/wave-divider.png" alt="" width="1200" height="40">
Pro tip: If the image is described by visible text right next to it, alt="" is usually correct. Repeating the same text makes screen readers say it twice.
4

Fix image buttons and image maps

An <input type="image"> works as a submit button, so its alt must say what the button does, not what the icon looks like. Each clickable <area> in an image map also needs its own alt describing its link target.

html
<input type="image" src="/icons/search.png" alt="Search">

<img src="/images/store-map.png" alt="Map of Example Co store locations" usemap="#stores">
<map name="stores">
  <area shape="rect" coords="0,0,200,150" href="/stores/north" alt="Northern region stores">
  <area shape="rect" coords="200,0,400,150" href="/stores/south" alt="Southern region stores">
</map>
Pro tip: Consider replacing image buttons with a normal <button> that contains visible text. It is easier to style and easier to translate.
5

Label SVGs and role="img" elements

An inline <svg> with role="img" needs a <title> as its first child, an aria-label, or an aria-labelledby. The same applies to any element given role="img", such as a div that uses a CSS background or a group of emoji. If an SVG icon is purely decorative, remove role="img" and add aria-hidden="true" instead.

html
<!-- Meaningful SVG -->
<svg role="img" aria-labelledby="chart-title" viewBox="0 0 400 200">
  <title id="chart-title">Sales grew 40% from 2024 to 2025</title>
  ...
</svg>

<!-- Element with role="img" -->
<div role="img" aria-label="Five-star rating" class="stars"></div>

<!-- Decorative icon -->
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24">...</svg>
Pro tip: Icon libraries often add role="img" by default. Check your icon component's props for a title or aria-label option before editing the raw SVG output.
6

Give embedded objects a text alternative

An <object> used to embed a PDF, SVG file or legacy media needs an accessible name. Add an aria-label or title, and put fallback text inside the element for browsers that can't render it.

html
<object data="/docs/price-list.pdf" type="application/pdf" width="600" height="800" aria-label="Example Co 2026 price list (PDF)">
  <a href="/docs/price-list.pdf">Download the Example Co 2026 price list (PDF)</a>
</object>
7

Fix images stored in your CMS

Many failing images come from content editors, not templates. In a CMS, alt text usually lives in two places: the media library entry and each placed copy of the image. Update both.

Then make sure your theme outputs the stored value rather than leaving the attribute out. See the platform notes below for exact menu paths.

liquid
{{ image | image_url: width: 800 | image_tag: alt: image.alt }}
Pro tip: For a large catalogue, export products to CSV (in Shopify, the Image Alt Text column) and bulk-edit alt text in a spreadsheet.
8

Re-run the check and test with a screen reader

Republish your changes, clear any page or CDN cache, and run this audit again. For a quick human check, turn on a screen reader and tab through the page:

  • macOS: VoiceOver (Cmd+F5)
  • Windows: NVDA (free)

Confirm that images read sensibly and decorative ones are skipped.

Pro tip: Add an accessibility linter such as eslint-plugin-jsx-a11y (alt-text rule), or run axe in CI, so new images without alt are caught before deploy.

Platform-specific notes

WordPress

In Media → Library, click an image and fill in **Alternative Text**. In the block editor, select the Image block and edit **Alternative text** in the right-hand settings sidebar. A block keeps its own copy of the alt text, so changing the Media Library value does not update images already placed on pages. Edit those blocks directly. For decorative images, leave the field empty; WordPress then outputs alt="".

Shopify

Go to Products, open a product, click a media item and choose **Add alt text** (or edit the existing alt text). Files under Content → Files also have alt fields. In theme code, use the image_tag filter, which outputs the image's stored alt (or alt="" if it is blank). Check custom sections where an <img> is hard-coded without alt.

Wix

In the Editor, click the image, choose **Settings**, and fill in **"What's in the image? Tell Google"**. That field becomes the alt text. Wix Studio offers an option to mark images as decorative. Gallery images have their own per-item description fields under Manage Media.

Webflow

Set a default alt per asset in the Assets panel: hover the image, click the settings icon, and enter **Alt text**. On each placed Image element, open the Settings panel and pick **Alt text**: use the asset description, enter a custom value, or choose **Decorative** (outputs alt=""). For CMS collections, bind the alt to a dedicated plain-text field.

Next.js

The next/image component requires an alt prop. Pass alt="" for decorative images rather than leaving it out. For icon libraries such as lucide-react or react-icons, add aria-hidden="true" to decorative icons, and add aria-label (with role="img") or visible button text to meaningful ones. Enable the jsx-a11y/alt-text ESLint rule to catch regressions.

Check that it worked

✅ How to verify

  • Re-run this audit and confirm the "Images have text alternatives" check passes on all scanned pages.
  • Run axe DevTools on key templates (home, product, blog post, contact) and confirm there are no image-alt, svg-img-alt, role-img-alt, input-image-alt, area-alt or object-alt issues.
  • In DevTools, open the Elements panel's Accessibility pane on an image and check that the Computed Name matches your description, or is empty for decorative images.
  • Navigate the page with VoiceOver or NVDA and confirm no file names are read aloud.

⚠️ Common mistakes

  • Using the file name or keyword stuffing as alt text ("IMG_2231" or "cheap shoes buy shoes best shoes") instead of describing the image.
  • Leaving out the alt attribute on decorative images instead of using alt="". A missing attribute fails the check; an empty one passes.
  • Adding role="img" to an icon SVG without a title or aria-label. Use aria-hidden="true" if it's decorative.
  • Updating alt text in the media library and assuming pages already using the image have changed. In many CMSs, each placed copy keeps its old value.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

What is the difference between alt="" and no alt attribute?

alt="" tells screen readers the image is decorative, so they skip it. With no alt attribute, many screen readers announce the file name or URL instead, and it counts as a WCAG failure.

How long should alt text be?

Usually one short sentence, roughly under 125 characters. Complex images such as charts should get a brief alt plus a longer description in nearby text or a linked data table.

Does alt text help SEO?

Yes. Google uses alt text to understand image content for Google Images and to add context to the page. Write it for people first; descriptive alt text naturally includes relevant terms.

Should I use the title attribute instead of alt?

No. The title attribute can technically provide a name, but it is inconsistently announced, appears only on mouse hover, and isn't available to touch users. Use alt on images and aria-label or <title> on SVGs.