Drupal
The Parity Drupal module connects Drupal 10.3+ and 11 to Parity's CMS APIs for publish-driven scans and in-editor findings. Complete the Parity-side setup (CMS Integration API key, Internal Site ID, allowed domains) before installing the module.
Requirements
- Drupal 10.3+ or Drupal 11
- PHP 8.1+
- Composer 2.x
- Outbound HTTPS from Drupal to your Parity API origin
- Inbound HTTPS from Parity workers to public staging or preview URLs
- Optional: Key module for storing the API key outside config export
Installation
- Add the module to your Drupal project (private Composer package or copy the module folder into `web/modules/custom/parity_a11y`).
composer require parity/drupal-module - Enable the module and clear caches.
drush en parity_a11y -y && drush cr - In Drupal admin, open Configuration → System → Parity Accessibility and enter:
- API base URL — Parity origin (no trailing slash)
- Internal Site ID — from Parity site CMS integration settings
- API key — CMS Integration scope key from Parity org settings
- Select content types and scan triggers (publish, update, delete). For decoupled sites, set the headless frontend base URL so scans target your public Next.js or static front end.
- Verify the connection from the settings form or Drush.
drush parity:verify --check-egress - Edit a published node — the Parity accessibility panel appears on the node edit form with findings and Scan now.
API contract (reference)
On-demand checks use POST {api_base}/api/v1/sites/{siteId}/cms-check with header Authorization: Bearer <api_key> and JSON body { "url": "<canonical-url>", "cmsType": "drupal", "contentId": "<nid>" }. Publish and update flows use cms-scan (async, queued in Drupal). The module proxies editor requests through /admin/parity-a11y/* so API keys never reach the browser.
More detail
Module source and install notes live in cms-plugins/drupal/parity_a11y/. For implementation-level behavior (quotas, mapping, security), see spec 24-cms-integration.md §10b.