Picto thématique

Rule n° 111 - Each decorative image has an appropriate text alternative.

Do you know that it is possible to listen to a page? This is what all people equipped with screen reader software, which is often the case for visually impaired and blind. This software reads their web pages. If you specified a text alternative for each decorative image, it will be systematically read. But after the twentieth time that the screen reader will have uttered the words "bullet point", the user may be upset. This rule is simple: if an image is decorative, not write alternative.

#Images and media #Editorial #SEO

Goal

  • Prevent users in environments where images are not seen (text browsers, screen readers or browsers with the images disabled) from being bothered by information about images that are unimportant to them.
  • Provide only pertinent information to web crawlers.
  • Improve the accessibility of content for people with disabilities.
  • Improve the way content is taken into account by search engines and indexing tools.

Implementation

In general, if a code (an HTML attribute, for example) is intended as an alternative, it must exist but be empty. For the most common cases:
  • Give each decorative img element an empty alt attribute (alt="").
  • Give each decorative area element an empty alt attribute.
  • Leave empty the content of each object element in question (between the <object> and </object> tags).
  • Leave the content of each canvas element in question empty.
  • Do not give any svg element in question any ARIA attribute that gives it a label (aria-labelledby, aria-describedby, etc.).

Control

This check is carried out in the HTML code generated using a code inspector or a dedicated toolbar:
  • Test first for the presence of alt attributes by checking the validity of the HTML code generated, for example with the W3C validator (the HTML validator shows the private alternative images): each decorative image must have an alt attribute (present but empty).
  • Check that each img image which does not convey information needed to understand the content has an empty alt.
  • Check any other object type graphic objects, the content of the canvas between the opening and closing tags must be empty.
  • Check any other elements of the svg type likely to receive an alternative via an ARIA attribute.

By Opquast - Read the license