# Use empty ALT for decorative images

- Check 11.06 · Semantic HTML and accessibility · Important
- Source: https://checklist-seo-geo.com/en/semantic-html-accessibility/use-empty-alt-decorative-images
- Mark decorative images with an empty alt, CSS or aria-hidden so that screen readers and crawlers ignore them, in your CMS or your components.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/semantic-html-accessibility/use-empty-alt-decorative-images.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A decorative image conveys no information: a background pattern, a divider, an icon next to text that says the same thing, a mood photo unrelated to the topic. It must have an `alt` attribute that is present but empty (`alt=""`), or be placed in CSS, so that assistive technologies skip it. The check consists of finding these images and verifying that the CMS or the components really output `alt=""`, not a missing or automatically filled `alt`. Expected result: a screen reader reads only the useful images.

## Why it matters

`alt=""` and a missing `alt` attribute are not equivalent. With `alt=""`, the browser removes the image from the accessibility tree: it is ignored. Without an `alt` attribute, many screen readers announce the image and read its file name (“bandeau-v3-final dot png”), which adds noise to every page.

The opposite mistake is common: some CMSs and plugins automatically fill the `alt` with the file title or the product name. A page that shows ten reassurance icons, each followed by its text, is then read as “delivery truck, Free delivery, padlock, Secure payment…”. The information is duplicated, listening takes longer, and the user can no longer tell the useful images apart.

For search engines, a properly marked decorative image is not meant to rank in image search: that is the intended result. Alternative text filled in artificially on images with no content looks, on the contrary, like keyword stuffing, which Google advises against.

## What it improves

- **Accessibility**: shorter, clearer listening. WCAG criterion 1.1.1, RGAA (French accessibility framework) criterion 1.2 (decorative images correctly ignored).
- **Signal quality**: the remaining alternative texts point to real information, which helps search engines understand images.
- **Audits**: automated tools stop flagging images without `alt` that do not need one.
- **Ranking**: no direct effect expected.

## How to check

**1. List ignored images, images with no attribute and icons.** In the developer tools console:

```js
console.table([...document.querySelectorAll('img, svg, [role="img"]')].map((el) => ({
  type: el.tagName.toLowerCase(),
  fichier: (el.currentSrc || el.getAttribute('src') || '').split('/').pop().slice(0, 40),
  alt: el.hasAttribute('alt') ? `"${el.getAttribute('alt')}"` : '(MISSING)',
  masque: el.getAttribute('aria-hidden') === 'true' || el.getAttribute('role') === 'presentation',
  texteVoisin: (el.closest('a, button, li, p, figure')?.textContent.trim() || '').slice(0, 40),
})));
```

What to examine:

- **`(MISSING)`**: to be fixed in every case, either with text or with `alt=""`.
- **An `alt` that repeats the neighboring text**: the image is probably decorative.
- **`alt=""` on an image that is the only content of a link or button**: an error, the link no longer has a name.
- **SVG with neither `aria-hidden` nor a title**: its content may be announced erratically.

**2. Automated audit.** axe DevTools flags images with no `alt` attribute and alternative text redundant with the neighboring text; WAVE shows a distinct icon for images with an empty `alt`, which lets you check at a glance that they really are decorative.

**3. Listen.** Go through the page with NVDA or VoiceOver: no decorative image should be announced.

## How to implement

### Before you start

An image is decorative if it can be removed without the reader losing any information. Typical cases:

| Image | Treatment |
| --- | --- |
| Pattern, texture, gradient, background shape | CSS background image |
| Divider, graphic bullet, ornament | CSS (`::before`, `border-image`) or `alt=""` |
| Icon next to text that says the same thing | `alt=""` or SVG with `aria-hidden="true"` |
| Mood photo with no useful information | `alt=""` |
| Card thumbnail whose link already contains the title | `alt=""` |
| Image whose `<figcaption>` already describes everything | `alt=""` is an option, or a short `alt` different from the caption |
| Image alone inside a link or button | never decorative: an `alt` that names the destination |

Reference markup:

```html
<img src="/images/vague-fond.svg" alt="" width="1440" height="120">

<li>
  <svg aria-hidden="true" focusable="false" width="24" height="24"><use href="#icone-camion"></use></svg>
  Free delivery from €60
</li>

<a href="/produits/chaise-oslo" class="carte">
  <img src="/images/chaise-oslo.webp" alt="" width="400" height="300">
  <span>Oslo chair in solid oak</span>
</a>
```

```css
.bandeau {
  background-image: url("/images/texture-papier.webp");
}

.titre-orne::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: currentColor;
}
```

Three clarifications:

- **`alt=""` with no space**: `alt=" "` is not recognized as empty everywhere.
- **`role="presentation"` or `aria-hidden="true"` on an `<img>`** do not replace `alt=""`: keep the empty attribute, which is enough and which every tool understands.
- **No `title` on a decorative image**: it would give it an accessible name again.

> **Warning:** an image is not decorative once and for all. The same team photo is decorative as a banner on a contact page and informative on the “About us” page. Decide based on the context of each placement.

### WordPress

Versions: WordPress 6.4 and later; “decorative image” checkbox in the Image block from WordPress 7.1.

- **Media Library**: if the image has alternative text saved in the library, it is used on insertion. Clear it in the block for this placement, or in the library if the image is always decorative.
- **Plugins that fill the `alt` automatically** (from the title or file name): turn off this option, or exclude theme images and icons.
- **Theme**: for a decorative image called in PHP, force the empty value:

```php
echo wp_get_attachment_image($image_id, 'large', false, ['alt' => '']);
```

- **Cover block**: the background image of a Cover block is treated as a background; if it carries information, put that information in the block's text.

#### WordPress 7.1 and later

In the Image block settings panel, tick “Mark as decorative”. The block then clears the alternative text, removes the caption and link, and outputs `alt=""` with `role="none"`. The checkbox does not appear when expand on click (lightbox) is enabled: turn it off for a decorative image.

#### WordPress 6.4 to 7.0

The Image block has no dedicated option: in the block settings panel, leave the “Alternative text” field empty. WordPress then outputs `alt=""`.

### Shopify

Versions: Online Store 2.0 themes (Horizon, Dawn), all Shopify plans, November 2026.

The `image_tag` filter uses the media's alternative text by default, or failing that the resource title (product, article, collection). A decorative thumbnail therefore inherits the product name. For a decorative image, pass an empty value explicitly and check the HTML output:

```liquid
{{ section.settings.background | image_url: width: 1600 | image_tag: alt: '', loading: 'lazy' }}
```

For theme reassurance icons, check that SVGs included via `{% render 'icon-…' %}` have `aria-hidden="true"` and `focusable="false"`, which recent themes do.

### Wix

Versions: Wix Editor and Wix Studio, November 2026.

Leave the alternative text field empty for a decorative image; if your editor offers an option to mark the image as decorative, use it. For a pattern or a texture, prefer the background of the section or strip rather than an Image element. Check in the published HTML that the image does have `alt=""` and not text taken from elsewhere.

### Squarespace

Versions: Squarespace 7.1, November 2026.

Squarespace has no “decorative image” option and uses the file name as the alternative text for most images left without `alt`. For a purely decorative image, place it as a section background image, which has no alternative text. For a decorative image in an Image block, at least give the file a neutral name before uploading.

### Webflow

Versions: Webflow Designer, November 2026.

In the Image element's `Settings`, the alt text setting lets you choose between custom text, the text defined in the `Assets` panel, and a “Decorative” option that outputs `alt=""`. For textures and patterns, use a background image in the `Style` panel. Webflow's audit panel flags images with no alternative text: mark decorative ones explicitly so that they no longer appear there.

### Laravel

Versions: Laravel 11 to 13.

In a Blade image component, always render the `alt` attribute, empty by default when the image is declared decorative:

```php
{{-- resources/views/components/picture.blade.php --}}
@props(['src', 'alt' => null, 'decorative' => false])

<img src="{{ $src }}" alt="{{ $decorative ? '' : $alt }}" {{ $attributes }}>
```

```php
<x-picture src="/images/vague-fond.svg" decorative width="1440" height="120" />
```

Add a test that fails if a component is called with neither `alt` nor `decorative`.

### Next.js

Versions: Next.js 15 and 16 (App Router and Pages Router).

`next/image` requires the `alt` property; for a decorative image, pass an empty string, as the Next.js documentation recommends:

```tsx
import Image from 'next/image';

<Image src="/images/vague-fond.svg" alt="" width={1440} height={120} />
```

For icon libraries (lucide-react, Heroicons, react-icons), check that they set `aria-hidden="true"` by default; if not, add it to every icon that accompanies text.

### Astro

Versions: Astro 5 to 7.

The `Image` component from `astro:assets` requires `alt` and accepts `alt=""` for a decorative image. SVG icons imported as components should get `aria-hidden="true"`.

## Common mistakes

- **Leaving out the attribute** in the belief that a missing `alt` is the same as an empty `alt`: the file name is then read out.
- **Making an image link decorative**: the link loses its name. Keep an `alt` that names the destination, or put text in the link.
- **Filling every `alt` to satisfy an audit**: tools cannot judge relevance; a useless `alt` is worth less than a deliberate `alt=""`.
- **Declaring decorative an image that carries text** (promotional banner, prices, opening hours): that text must be conveyed.
- **An icon alone in a button marked `aria-hidden` with no name on the button**: the button becomes silent. See [distinguish action buttons from navigation links](https://checklist-seo-geo.com/en/semantic-html-accessibility/distinguish-action-buttons-from-navigation-links).

## Frequently asked questions

### What is the difference between an empty alt and no alt attribute?

An empty alt, written alt="", indicates that the image is decorative: the browser removes it from the accessibility tree and screen readers ignore it. A missing alt attribute is an error: many screen readers then announce the image and read its file name instead. Accessibility audits flag the missing attribute, not the empty one, which they treat as a deliberate choice.

### Can an image with an empty alt appear in Google Images?

It can still be crawled and indexed, because Google also relies on the page context, the file name and computer vision to understand an image. In practice, a decorative image is not meant to attract traffic from image search. If an image deserves to be visible there, it carries information: give it descriptive alternative text instead.

### How do I know whether an image is decorative?

Ask yourself a simple question: if the image disappeared, would the reader lose any information? If the answer is no, it is decorative. That is the case for a background pattern, a divider, an icon next to text that says the same thing, or a mood photo. An image alone inside a link or button, or one that contains text, is never decorative.

### Should SVG icons have aria-hidden?

Yes, when the SVG icon accompanies text that already says the same thing, such as a truck icon in front of “Free delivery”. The aria-hidden="true" attribute removes it from the accessibility tree, and focusable="false" avoids a stray tab stop in older browsers. If the icon is alone in a button or link, give that button or link an accessible name instead.

## Resources

- [W3C WAI: decorative images](https://www.w3.org/WAI/tutorials/images/decorative/)
- [W3C WAI: an alt decision tree](https://www.w3.org/WAI/tutorials/images/decision-tree/)
- [WHATWG: requirements for providing text to act as an alternative for images](https://html.spec.whatwg.org/multipage/images.html)
- [RGAA 4.1.2 (French accessibility framework): criterion 1.2, decorative images](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/)
- [Next.js: Image component, alt property](https://nextjs.org/docs/app/api-reference/components/image)
- [Shopify: Liquid image_tag filter](https://shopify.dev/docs/api/liquid/filters/image_tag)
- [Squarespace: adding alt text to images](https://support.squarespace.com/hc/en-us/articles/206542357-Adding-alt-text-to-images)

Next steps: [provide ALT text for informative images](https://checklist-seo-geo.com/en/semantic-html-accessibility/provide-alt-text-informative-images), [write relevant ALT text without keyword stuffing](https://checklist-seo-geo.com/en/images-multimodal-search/write-relevant-alt-text-without-keyword-stuffing) and [check color contrast](https://checklist-seo-geo.com/en/semantic-html-accessibility/check-color-contrast).
