Change record status: 
Project: 
Introduced in branch: 
10.4.x
Introduced in version: 
10.4.0
Description: 

There are some contexts where images are purely decorative, conveying no additional information beyond the content surrounding them. In these cases, images can indicate this decorative role to assistive technologies as described in https://www.w3.org/WAI/tutorials/images/decorative/ .

In text formats using CKEditor 5, uploaded images already could already be marked decorative through a toggle switch introduced in #3222757: [drupalImage] Make image alt text required or strongly encouraged. This ability was not available, however, on images added through Drupal's Media library.

Drupal image media still require alt text to be entered when the image is originally added to the Media library, and unless a content editor explicitly marks the image as decorative, the media entity's default alt text will render with the image. Content editors may mark the image as decorative using the balloon-style editor visible when a media entity is selected in the CKEditor, as shown below:

When rendered, the image will include an empty alt attribute, signaling to assistive technologies that the image is decorative. Note that omitting the alt attribute altogether is not equivalent to this, and is not allowed, per WCAG F65.

Impacts: 
Site builders, administrators, editors