Skip to main content
All Collections1.1.1 Non-Text Content
Image not in the Accessibility Tree is Decorative
Image not in the Accessibility Tree is Decorative

Check that visible images and graphics only have a decorative function if they are marked as decorative in the code.

Updated over a week ago

This document gives information about the related Monsido checks:

  • Image not in the accessibility tree is decorative.


What

Check that visible images and graphics only have a decorative function if they are marked as decorative in the code.

A decorative image is one that does not convey meaningful information or serve a functional purpose. Such images are used solely for visual enhancement.


Why

When images or graphics are marked as decorative in the code, it means that assistive technologies, such as screen readers that enable blind users to read a webpage, will skip over the image. This is a useful feature because it allows users who cannot see the visual content to avoid wasting time on graphic elements that are purely aesthetic.

However, it is a problem if images and graphics that provide information or functionality are marked as decorative in the code. Assistive technologies will also skip these images, meaning the user won't have access to the important information or functionality that the images convey.

Affected Users

This check affects individuals with:

  • Blindness; Who can read the image text alternative on a braille display.

  • Other vision impairments; Who access the site contents with a screen reader or other text-to-speech software.

User Story

Bridgit and her five-year-old daughter playing happily in their living room.

Bridgit is a blind mother to a five-year-old girl and an 11-year-old boy:

“The other day, my internet connection went down, and when I tried to call my provider for help, I ended up on their website. It just said, "Call us at," and then the computer stopped talking. I couldn’t read the actual number I needed to call. It’s really frustrating because I know it’s right there on the screen if I could see it, but they've hidden it from me. This kind of thing makes me so irritated. I had to wait until the next day to get a colleague to help me read it. But it's a waste of her time and mine that it has to be necessary.”

Examples

Example: Informative image marked as decorative

On a company's website, a world map is displayed, highlighting the four cities worldwide where the company has offices. The code that inserts the map image has an empty alt attribute which marks the image as decorative.

<img src="path/to/world-map.jpg" alt=””>

World map showing the location of the company's offices. As an empty alt attribute is provided, the screen reader does not announce anything.

Visually, the image shows that the company has offices in San Francisco, USA; Bangalore, India; Berlin, Germany; and Toronto, Canada. However, this information is not accessible to screen reader users because the image is marked as decorative with an empty alt attribute (alt="").

Example: Decorative image

The beginning of each new section on the website is marked with a prominent star. The image of the star conveys no information but is solely there to be visually striking. The star image is inserted using an <img> element with an empty alt attribute.

<img src=”red_star.jpg” alt=””>

Three sections of text are showing on a web page about coffee. Each section is accompanied by a large, red star. Each image of the star has an empty alt attribute.

When a blind person uses screen reader software to have the webpage read aloud, the screen reader will ignore the images of stars and will not mention them. This is helpful because it means the user does not waste time dealing with visual stars that do not provide any useful information.


How

How to review it?

The Monsido platform highlights the images and graphic elements that are marked as decorative in the code.

Your task is to confirm whether the highlighted images are truly decorative. You need to assess if the image conveys any information or functionality, or if it is there purely for visual or aesthetic reasons.

Ask yourself this question: Will the user lose any information or functionality if the image is removed from the page?

If the answer is no, then the image is decorative, and you can mark this issue as "reviewed" on the platform.

If the answer is yes, it means there is an error on the website that should be fixed by adding a descriptive text alternative to the image.

For instructions, see the user guide article:

In the example above where a world map shows the cities where a company has offices, you can fix it by changing the empty alt attribute (which marks the image as decorative) to include a description that provides the relevant information conveyed by the image.

Change from:

<img src="path/to/world-map.jpg" alt=””> 

To include a descriptive text alternative:

<img src="path/to/world-map.jpg" alt=”We have offices in San Francisco, USA; Bangalore, India; Berlin, Germany; and Toronto, Canada.”> 

Note

It is relatively common for an informative image, such as an icon, to be marked as decorative if the visible text next to the image describes the purpose of the icon. For example, an envelope icon with the text "Send email" next to it.

An icon displaying an envelope is showing on a web page with the text "Send email" written next to it.

In this case, the text "Send email" serves as a conforming alternative version, and it is acceptable to have the icon itself marked as decorative.

Note

In addition to the empty alt attribute alt="", there are other coding techniques that indicate images or graphic elements are decorative. For example, aria-hidden="true" and role="none". See the "ACT rules" section below for a detailed technical explanation of this check.


Additional Resources

WCAG success criteria

ACT rules

Related accessibility conformance testing rules.

Other resources

Did this answer your question?