Skip to main content
drupalreleases
Release: Schema.org Metatag 3.1.0 — Minor update available for module schema_metatag (3.1.0). Release: Entityqueue 8.x-1.13 — Minor update available for module entityqueue (8.x-1.13). Release: htmLawed 4.1.8 — Minor update available for module htmlawed (4.1.8). Release: Group Media 4.0.8 — Minor update available for module groupmedia (4.0.8). Release: Views Reference Filter 2.0.0-beta9 — New beta version released for module entityreference_filter (2.0.0-beta9). Release: LLMs.txt Gen 1.0.3 — Minor update available for module llms_txt_gen (1.0.3). Release: Fluidproject UI Options 3.0.2 — Minor update available for module fluidui (3.0.2). Release: LocalGov Guides 2.2.6 — Minor update available for module localgov_guides (2.2.6). Usage Milestone: Mime Mail — Module mimemail crossed 50,000 active installs. Module Revived: OIDC Menu 1.0.0 — Module oidc_menu updated after 36 months of inactivity (1.0.0).

Accessible Content Constraints blocks saving content that has common accessibility errors in text and image fields, such as skipped heading levels, empty links, or images without alternative text. The rules are enforced on save, so editors can't ignore them, and they also apply to content saved through REST, JSON: API, or migrations.

Why this module

This module comes from years of accessibility remediation on large Drupal sites, mostly for universities. On project after project, audits flagged the same problems in content: tables without header cells, images without alternative text or with a file name as alt, skipped heading levels, H1s inside the body, empty links, and untitled video embeds.

Fixing them once was not enough. The same errors came back with every new page, because editors either didn't know the rules or ignored the warnings of browser checkers. We needed a way to prevent them from being saved at all, not only to find them in the next audit. This module enforces those rules on save.

Features

Rules are enabled per field. Each one checks a clear WCAG failure:

  • Heading levels in order: no skipped level, such as H2 followed by H4, with a configurable starting level (WCAG 1.3.1).
  • No H1 headings: the page title is the H1 (1.3.1).
  • No empty headings (1.3.1, 2.4.6).
  • No links without text: a link needs an accessible name from its text, aria-label, aria-labelledby, title, or an image with alt text (2.4.4, 4.1.2).
  • Images have an alt attribute: alt="" is allowed for decorative images (1.1.1).
  • Alternative texts are not file names or generic words, such as IMG_1234.jpg or "image". Also checked image fields, media image fields, and alt overrides of embedded media (1.1.1).
  • Tables have header cells and no empty header cells (1.3.1).
  • Embedded frames have a title: <iframe> elements such as videos and maps (4.1.2).

All the errors of a field are reported at once, with the offending text, as a list on the entity form.

Typical use cases: university, government, and other sites that must meet WCAG 2.x AA, ADA or Section 508, where accessibility audits require that known errors never reach production.

Post-Installation

There is no global settings page. Rules are enabled per field:

  1. Go to "Manage fields" of an entity bundle, for example, Structure » Content types » Article » Manage fields.
  2. Edit a text (formatted), text (formatted, long), text with summary, or image field.
  3. Open "Accessibility constraints", enable the rules to enforce, and, for the heading order rule, set the starting heading level.
  4. Save the field settings.

The rules also apply when existing content is edited. Users with the "Bypass accessibility constraints" permission (and administrators) can save content that breaks them, for example, to save legacy content or run migrations. Test the rules with an editor account.

Additional Requirements

  • Drupal 10.3 or 11
  • Core Field and Text modules. Image fields are supported when the core Image module is enabled.

Editoria11y, to give editors live feedback while they write, before the save is blocked.

Similar projects

  • Editoria11y and CKEditor Accessibility Auditor check content in the browser and warn editors, who can ignore the warnings. This module enforces the rules on the server when content is saved. They work well together.
  • Accessibility Filters hides empty headings and links when content is displayed. This module prevents them from being saved.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Oct 2026
Latest release
1 hour ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0-alpha2 Pre-release 10–11 Oct 7, 2026