Tests

Get Started

To get started with checking images, refer to the WAI Easy Checks — A First Review of Web Accessibility page.

Summary

This test checks that visible img, svg and canvas elements that are ignored by assistive technologies are decorative.

Applicability

This outcome applies to any img, canvas or svg element that is visible and for which one of the following is true:

excluded:
The element is not included in the accessibility tree; or
ignored svg:
The element is an svg with an empty ("") accessible name and a semantic role of graphics-document; or
ignored canvas:
The element is a canvas with an empty ("") accessible name and no explicit semantic role; or
Exception: This outcome never applies to elements for which one of the following is true:
The element has an ancestor in the flat tree that is named from author; or
The element is an img element where the current request's state is not completely available.

Note: An example of an image ignored because of an ancestor with named from author is when the image is a descendant of a button element that uses aria-label for its accessible name.

Expectation

Each test target is purely decorative.

Note: It is relatively common for an informative image such as an icon to be marked up as decorative, if the text alternative is adjacent to the image. This is a conforming alternative version for the image. This fails the rule but meets conformance requirement 1 of WCAG 2.1.