Setting an image as decorative removes alt attribute instead of showing an empty alt attribute

Created on 14 September 2021, over 3 years ago
Updated 3 April 2025, 3 days ago

Problem/Motivation

When setting an image as decorative the alt attribute gets removed from the img tag when it actually should display an empty alt tag (if I interpreted the guidelines correctly). More information about the empty alt attribute.

Proposed resolution

When an image is set as decorative generate an empty alt attribute instead of removing the alt attribute.

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

🇳🇱Netherlands rroose

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024