Accessibility (a11y)

Public sites should check for accessibility issues, using Pa11y.

Automated tests

Create a pa11y.default.json file for the default configuration, for example:

{
  "defaults": {}
}

Create a pa11y.mobile.json file for the mobile configuration, for example:

{
  "viewport": {
    "width": 320,
    "height": 480,
    "deviceScaleFactor": 2,
    "isMobile": true
  }
}

Test individual URLs with pa11y, for example:

pa11y -c pa11y.default.json http://127.0.0.1:8000

If the site has a sitemap, use pa11y-ci, for example:

pa11y-ci -c pa11y.default.json -s http://127.0.0.1:8000/sitemap.xml

Continuous integration

Note

This section is a stub. For now, see the Data Registry’s a11y.yml workflow file.