Changelog #44
This release adds a new accessibility and code quality test suite for the UCSB Web Theme upstream.
The suite runs automatically in GitHub Actions on upstream pull requests and is also available locally, enabling site owners and developers to audit custom modules, themes, and subthemes against the same checks before remediation work begins.
What Changed
- Added GitHub Actions workflow support for accessibility and code quality testing.
- Added Drush commands for running the test suite locally.
- Added linting checks for custom PHP, JavaScript, CSS, Twig, YAML, Markdown, Composer, and GitHub Actions workflow files.
- Added accessibility checks using Alfa, axe-core, pa11y, reflow, and meta viewport audits.
- Added unified HTML reports under:
web/sites/default/files/test-reports/
Who Should Use It
Upstream maintainers will review and remediate issues found in upstream code. Individual site owners and developers can also run the test suite locally against their own Drupal site to identify issues in custom modules, custom themes, subthemes, and other site-specific code before remediation work begins.
Local Setup
After pulling the latest upstream changes, run the first-time setup commands:
drush utest:js-install drush utest:browsers drush utest:check-config
Before running accessibility tests, set BASE_URL to the local site you want to test:
export BASE_URL=https://your-site.ddev.site
Use the correct local URL for your environment, such as a DDEV, Lando, or other local development URL.
Run the Test Suite
Run all tests against the configured local site:
drush utest:all
Run only code quality checks:
drush utest:lint
Run accessibility checks:
drush utest:a11y:alfa-full drush utest:a11y:axe-full drush utest:a11y:pa11y drush utest:a11y:reflow drush utest:a11y:meta-viewport
Scope checks to a specific module, theme, or path:
drush utest:lint --module=my_custom_module drush utest:lint --theme=mysubtheme drush utest:a11y:alfa --paths=/about,/contact
Reports
After a test run, start with the unified report:
web/sites/default/files/test-reports/index.html
Note: The test suite is intended to help identify issues early. Findings in upstream code will be handled by upstream maintainers. Findings in site-specific custom code should be reviewed and remediated by the site owner or developer responsible for that code.