Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Alt Text Validation

635 sites Security covered Drupal 10–11
View on drupal.org

This module helps improve image alt text by providing an auditable report of existing alt text and implementing customizable validation rules. It can warn editors about potential issues or prevent content from being saved until problems are resolved, ensuring better accessibility and content quality.

Introduction

This module helps prevent editors from writing bad alt text on images. This module does a few things:

  • Provide a report of all alt text attached to images for auditing purposes.
    • Filterable
    • Downloadable to CSV
    • Report generation controlled by cron or manual
    • Finds images in ALL image fields, and all text fields that support html across all entities.
  • Provide customizable rules to validate alt text against during save.
  • Server side validation of the rules against submitted alt text upon saving.
    • "Warn" rules do not prevent saving content but give warnings about any issues.
    • "Prevent" rules will not allow saving until the issues are resolved.
    • Individual rules can be turned off.
    • A main switch allows rules validation to be turned off, while still allowing to them to be used by the report,

Table of contents

  • Requirements
  • Installation & Configuration
  • Alt Text Report
  • Drush Commands
  • Launch Strategies
  • Developers and Contributors

Requirements

This module requires

Installation & Configuration

Configuration steps are minimal:

  1. Install the module as you would any other module.
  2. Go to /admin/config/content/alt-text-validation and configure to your needs.
  3. Assign permissions for administering the module and viewing the report to Roles.
  4. Go to /admin/config/content/alt-text-validation/rules to add/edit rules. Give careful thought to which rules should be "warn" and which rules should be "prevent".

Report

The Alt Text Audit report is present at Reports >> Alt Text Report (/admin/reports/alt-text-report) for properly permed users. This report is a View that can be modified if needed. It requires the Auditor job be run to populate the report. The audit report will show any occurrences of image containing fields on any entity. It also includes any html image tags found within text fields on any entity. Scroll to the bottom of the report to see the CSV icon to download a CSV of the current View.

There are three ways to initialize the report generation. Depending on the size of your site, it may be an intensive process. To populate the report you will need to either:

  1. Enable report generation via cron (/admin/config/content/alt-text-validation) - It will begin the generation with the next cron run.
  2. On the report page, there is a button to run the report using a batch process.
  3. Via Drush command.
drush alt-text-validation:queue-audit
drush cron

It uses the Queue API and may take several cron runs to fully populate the report. You can assess the progress by drush queue:list then look for atv_entity_instances The top of the report contains information about when the report was started and finished.

Drush Commands

  • drush alt-text-validation:queue-audit - this command queues up the entities to audit. It requires cron to run (perhaps more than once) to complete the audit.

Launch Strategies

There are a few possible ways to roll this module out to editors:

  • Info gathering only - Add rules, but turn off "Validate alt text on save". This will let you run the report to collect info and strategize what rules you will put in place.
  • Soft start - Create only a handful of the most important rules and turn them on as warnings. Gradually change a few rules at a time from "warn" into "prevent".
  • Hard-line - Turn it on, add a bunch of Prevent rules and turn on "Validate alt text on save". It might be painful for editors at first, but will get you to full compliance faster.

Other notes related to approaches

  • Rules can also be about content strategy rather than just accessibility. Example: Your company has an abbreviation that happens to match a state. Many screen screen readers will read 'CA' as California, rather than "C A", so you could warn people to use the full name instead of the abbreviation.

Developers and Contributors

This project uses ddev-drupal-contrib

  • Install ddev locally.
  • Clone the alt_text_validation project repository or any issue fork
  • Refer to the ddev-drupal-contrib readme file for instructions on using the plugin and the testing tools it provides (phpunit, phpcs, eslint, etc).

Depends on

Dependencies of the latest stable release

  • field Drupal core
  • views Drupal core
  • views_data_export Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
17
Tracked since
Jan 2025
Latest release
2 months ago
Releases (12 mo)
2 ▼ from 15
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.3 Stable 10–11 Jun 5, 2026
1.0.2 Stable 10–11 Apr 4, 2026
1.0.1 Stable 10–11 Aug 26, 2025
1.0.0 Stable 9–11 Aug 21, 2025
1.0.0-beta3 Pre-release 9–11 Aug 20, 2025
1.0.0-beta2 Pre-release 9–11 Aug 17, 2025
1.0.0-beta1 Pre-release 9–11 Aug 15, 2025
1.0.0-alpha9 Pre-release 9–11 Aug 13, 2025
1.0.0-alpha8 Pre-release 9–11 Aug 7, 2025
1.0.0-alpha7 Pre-release 9–11 Aug 6, 2025
1.0.0-alpha6 Pre-release 9–11 Feb 9, 2025
1.0.0-alpha5 Pre-release 9–11 Feb 1, 2025
1.0.0-alpha4 Pre-release 9–11 Jan 27, 2025
1.0.0-alpha3 Pre-release 9–11 Jan 23, 2025
1.0.0-alpha2 Pre-release 9–11 Jan 13, 2025
1.0.0-alpha1 Pre-release 9–11 Jan 7, 2025
1.0.x-dev Dev 10–11 Jan 3, 2025