ai_editoria11y
Overview
AI Editoria11y adds a "Fix with AI" button to Editoria11y accessibility tooltips in
CKEditor 5 fields.
When Editoria11y detects an accessibility issue, like missing table headers or generic "click here" link text, editors can click "Fix with AI" to get an
intelligent suggestion. They review the suggestion, edit if needed, and apply it directly to the content. AI suggests, humans decide.
Supported Accessibility Checks
- Tables: Missing header cells, empty header cells, content headings inside tables
- Headings: Empty headings, long headings, skipped heading levels, fake headings (bold text used as headings)
- Links: Empty links, links with no label, link text is a URL, generic link text ("click here", "read more"), links opening in new windows
- Text: Fake lists (dashes/asterisks instead of proper lists), ALL CAPS text blocks
- Images: Very long alt text
Planned (later releases):
- Images: Missing alt, meaningless alt, placeholder alt, filename as alt, unpronounceable alt, decorative images, linked images without alt
(requires image recognition) - Embeds: Video captions, audio transcripts, data visualizations (requires video/audio capabilities)
- Documents: Linked document accessibility / PDFs (requires document analysis)
Requirements
- Drupal 10.3+ or 11.x
- Editoria11y - Real-time accessibility checking
- AI module with AI CKEditor sub-module enabled
- At least one AI provider configured (OpenAI, Anthropic, Gemini, etc.)
- CKEditor 5 text format
Installation
- Install via Composer:
composer require drupal/ai_editoria11y - Enable the module:
drush en ai_editoria11y - Grant the "Use AI to fix accessibility issues" permission to appropriate roles
- In each CKEditor 5 text format, enable the "Fix Accessibility Issue" AI CKEditor plugin and select an AI provider
Configuration
AI Provider
Select which AI provider and model to use in the text format's AI CKEditor plugin settings (Administration > Configuration > Content authoring >
Text formats and editors).
Custom Prompts
Optionally customize the system and user prompts in the same plugin settings form. Available placeholders:
{{ element_html }}- The HTML of the element to fix{{ issue_description }}- Editoria11y's description of the problem{{ element_tag }}- The element's tag name (img, a, table, etc.){{ element_text }}- The element's text content{{ before_html }},{{ after_html }}- Surrounding HTML context{{ before_text }},{{ after_text }}- Surrounding text context{{ attributes_info }}- Formatted list of the element's attributes
Debug Mode
Enable "Debug mode" in the plugin settings to display element details, surrounding context, and the full AI prompt in the fix dialog.