Content generated via styles is provided with an appropriate alternative.

Certain CSS instructions allow you to display texts and images that are effectively invisible to users and tools that do not support style sheets. For example, if CSS colors or styles are deactivated, a CSS image (background-image property) will not be visible whereas an HTML image (<img> element) would have been.

Objectives

  • Allow users placed in contexts where styles are not rendered (text browser, screen reader, browser with disabled styles) to access the information present in the form of content generated in CSS (background images notably).
  • Improve the accessibility of content to people with disabilities.

Implementation

  • Providing hidden content for display via CSS:
    • for each information carried by the CSS background-image or content properties;
    • for each information displayed via a CSS pseudo-element:before or:after;
    • and more generally, for each information otherwise absent from the page and whose restitution depends on the style support.

Control

  • The control is done when designing the digital book, paying particular attention to the use of CSS pseudo-elements:before or:after and CSS background-image. We will visually compare the normal display of the page concerned with its rendering after deactivating the background images. We will compare the display with and without background images.

Validation

  • Needs to be human verified.

Informations :

Steps concerned :

references :

metadata :

  • ONIX
  • OPF

About that rule

Rule origin : Opquast | Opquast reference 4 183 | Updated on July 22, 2024

Previous rule | Next rule