liveBook · Manning

Decorative image

As explained in Architecting Accessibility

A decorative image adds no meaningful information beyond the surrounding content.

A decorative image adds visual polish but no meaning needed to understand the content. Sighted readers often filter it out; screen readers may announce it, adding clutter, interrupting navigation, and making important information harder to find. section 3.3.1

If an image is purely decorative, give an <img> an empty alt attribute (alt=""). This keeps it out of assistive technology announcements. You can also remove it from the markup and use a CSS background image. If it conveys information or functionality, it is not decorative and needs an accessible name. section 3.3 section 3.3.1

<section class="hero">
  <img src="hero-background.png" alt=""> #A
  <h2>Products and Services</h2>
  ...
</section>

An empty alt attribute hides the hero image from assistive technologies while leaving the heading available. section 3.3.1

Ask whether the image adds information beyond nearby text. If the same information is already provided, treating the image as decorative can avoid duplicate announcements. section 3.3.2

How Architecting Accessibility covers it

How deep it goes
Defines decorative images, explains their screen-reader impact, and shows empty-alt and CSS-background approaches.
Examples
Uses stock photography, graphical section dividers, list emojis, and a hero background as examples.
What you can do after
Apply empty alt text or CSS backgrounds to keep purely decorative images out of assistive technology announcements.
How it connects
Connects decorative images with alternative text, screen readers, informative images, and functional images.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.