# Decorative Images: When alt="" Is the Right Choice

Source: https://allyway.ai/glossary/decorative-images

Decorative images are images that are pure decoration or only used for visual formatting and add no information to the page. WCAG 1.1.1 requires that they are implemented in a way that assistive technology can ignore, for example with an empty alt attribute or as a CSS background.

Decorative images are the flourishes, divider lines, background textures and mood photos that make a page look good but say nothing a reader would miss. For screen reader users, the best description of such an image is no description at all: an empty `alt=""` tells the screen reader to skip it. A divider announced as "graphic, line-separator-final-2.png" is noise, not information.

## What it means

[WCAG 1.1.1 Non-text Content](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (Level A, [WCAG 2.2](https://allyway.ai/regulations/wcag-2-2)) requires a text alternative for all non-text content – except in a few listed situations. One of them is "Decoration, Formatting, Invisible": if non-text content is pure decoration, is used only for visual formatting, or is not presented to users, then it is implemented in a way that it can be ignored by assistive technology.

The hard part is deciding. Ask: would a reader lose information or function if the image were gone?

| Image | Decorative? | Right markup |
|---|---|---|
| Divider line, ornament, background pattern | Yes | `alt=""` or CSS background |
| Photo next to text that already says the same | Usually yes | `alt=""` |
| Icon next to a visible word, e.g. a trash can beside "Delete" | Yes | `alt=""` or `aria-hidden="true"` on the icon |
| Logo that links to the homepage | No | `alt="Company name – home"` |
| Chart, product photo, image of a person in the news | No | A real [alt text](https://allyway.ai/glossary/alt-text) |

> **Warning:** > **Empty is not missing**
> `alt=""` is a deliberate decision. Leaving the attribute out entirely is a [missing alt attribute](https://allyway.ai/glossary/missing-alt-attribute): many screen readers then read the file name instead.

W3C names two techniques for decoration: H67 (null alt text and no title attribute on `img` elements that assistive technology should ignore) and C9 (using CSS to include decorative images).

## Examples

```html title="Example"
<!-- Decorative: skipped by screen readers -->
<img src="/img/wave-divider.svg" alt="">

<!-- Icon beside a visible label: hidden, the text names the button -->
<button type="button">
  <svg aria-hidden="true" focusable="false">…</svg>
  Delete
</button>

<!-- Pure decoration as CSS background -->
<section class="hero" style="background-image: url(/img/texture.jpg)">
  <h2>Our workshop</h2>
</section>
```

The `img` has an empty alt and no `title`, as H67 describes. The icon is hidden because the word "Delete" already names the button – a reader gets the [accessible name](https://allyway.ai/glossary/accessible-name) once, not twice.

**Do:** Do

Use `alt=""` for images that add nothing, move pure decoration into CSS, hide icons that sit next to their own label, and write a real description whenever an image carries content or is the only content of a link or button.

**Don't:** Don't

Leave out the `alt` attribute, write "decoration" or "image" as alt text, give a decorative image a `title`, or mark a linked logo or an informative chart as decorative.

## How to check decorative images



## Questions

Q: What is a decorative image?
A: An image that is pure decoration or only used for visual formatting and adds no information. If a reader would lose nothing when it is removed, it is decorative.

Q: How do I mark an image as decorative in HTML?
A: Give the `img` element an empty alt attribute (`alt=""`) and no `title`. Images that are only decoration can also be added through CSS. Inline [SVG icons](https://allyway.ai/glossary/accessible-svg) next to text are often hidden with `aria-hidden="true"`.

Q: Is alt="" the same as a missing alt attribute?
A: No. `alt=""` tells assistive technology to ignore the image. Without the attribute, many screen readers announce the file name, which is a failure of WCAG 1.1.1.

Q: Should a logo have empty alt text?
A: Usually not. A logo identifies the company and often links to the homepage, so it needs alt text such as the company name. It is decorative only when the same name appears right next to it in the same link.

Q: Can allyWay fix decorative images automatically?
A: Yes. When allyWay's AI finds an image purely decorative, it gives it an empty description so screen readers skip it, and images your website already marks as decorative are left as they are. The fix is applied by the allyWay script, so your code and theme stay unchanged, and you can change any decision back. [Start for free](https://app.allyway.ai/register) and let AI sort out [automatic fixes](https://allyway.ai/automatic-accessibility-fixes-for-website) for your images.
