Drupal is a registered trademark of Dries Buytaert

decor

3 sites No security coverage
View on drupal.org

Assign empty alt attributes to decorative images so they can safely be ignored by assistive technologies, making your content clearer and more inclusive for everyone.

Usage

No custom fields or extra markup needed. Just add the js-decor class to any container element in your Twig templates (hero, card or teaser).
Every <img> inside the container will be treated as decorative, with no setup needed. The module will instantly apply empty alt attributes, role="presentation" and remove title attributes to mark images as decorative and removing them from the accessibility tree.

WCAG

This module helps you with WCAG Technique H67: Using null alt text and no title attribute on img elements for images that assistive technology should ignore for meeting Success Criterion 1.1.1: Non-text Content (Level A).

Issues in core

Similar projects

Activity

Total releases
4
First release
Jun 2025
Latest release
8 months ago
Release cadence
4 days
Stability
75% stable

Release Timeline

Releases

Version Type Release date
1.0.2 Stable Jun 20, 2025
1.0.1 Stable Jun 15, 2025
1.0.0 Stable Jun 10, 2025
1.0.x-dev Dev Jun 9, 2025