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
- 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
- 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.
Discover Opquast training and certification
The objective of these rules and the Opquast community mission is ‘making the web better’ for your customers and for everyone! Opquast rules cover the key major areas of risk that can negatively affect website users such as privacy, ecodesign, accessibility and security.
Opquast training has already allowed over 19,000 web professionals to have their skills certified. Train your teams, contact us
We offer a 1 hour free discovery module.