Title: Pa11y and Pa11y-CI Accessibility testing
Author: Immanuel Raj
Published: February 22, 2024
Last modified: February 15, 2025

---

# Pa11y and Pa11y-CI Accessibility testing

[February 22, 2024](https://immanuelraj.dev/pa11y-and-pa11y-ci-accessibility-testing/)

—

by

[Immanuel Raj](https://immanuelraj.dev/author/iamimmanuelraj/)

in [Uncategorized](https://immanuelraj.dev/category/uncategorized/)

Read Time

2–3 minutes

Accessibility is a really important thing when it comes to making a good site and
make it available for all to use the site and for crawlers to make things easy as
well. Automating this and making the best of the site to keep going faster without
worry about accessibility and let the bot do the report for you so that you can 
fix later is the best part. So let’s do this automation.

---

**Pa11y (Pally)**

A command-line interface which loads web pages and highlights any accessibility 
issues it finds. Useful for when you want to run a one-off test against a web page.

---

I will be covering what their documentation forgot to document (that which i leant
from my own testing and learning).

---

## Running test with sitemap

Pa11y and Pa11y-Ci says that you can do testing with sitemap.xml files while its
really good. Here are the things that they didn’t document well

 * Pa11y can scan and add sub sitemap links and do scan on them
 * Pa11y can parse sitemap index and add links and sub sitemap files automatically
   and parse them and it to the list of links to test and also test it automatically
 * Pa11y can run sitemap test and local html file test and test based on config 
   files all at once (All can be done at same time)

---

## Running test with local html files

Pa11y and Pa11y-Ci says that you can do testing with local html files while its 
really good. Here are the things that they didn’t document well

 * Pa11y can scan local html files while still using sitemap or json based config(
   All can be done at same time)

---

## Running test with config.json

Pa11y and Pa11y-Ci says that you can do testing with config.json files while its
really good. Here are the things that they didn’t document well

 * Pa11y can do scans with config.json files while still using sitemap or local 
   html based config (All can be done at same time)

---

## Bonus

Accessibility testing automation with github actions

    ```wp-block-code
        steps:      - name: Setup node        uses: actions/setup-node@v4        with:          node-version: 18      - name: Install pa11y-ci.        run: npm install -g pa11y-ci      - name: Checkout source.        uses: actions/checkout@v4      - name: Install Chrome.        uses: browser-actions/setup-chrome@v1        with:          chrome-version: 120      - name: Run pa11y-ci.        run: pa11y-ci https://immanuelraj.dev
    ```

[accessibility](https://immanuelraj.dev/tags/accessibility/) [automation](https://immanuelraj.dev/tags/automation/)
[pa11y](https://immanuelraj.dev/tags/pa11y/) [pally](https://immanuelraj.dev/tags/pally/)
[search-engine-optimization](https://immanuelraj.dev/tags/search-engine-optimization/)
[seo](https://immanuelraj.dev/tags/seo/) [testing](https://immanuelraj.dev/tags/testing/)

[Previous:  Rootless docker](https://immanuelraj.dev/rootless-docker/)

[Next:  Piping Bash](https://immanuelraj.dev/piping-bash/)

![Immanuel Raj Avatar](https://secure.gravatar.com/avatar/88db6e1fa27cf854075acbaa156189ace30cf3701b2d8640cd774280ead1d4d3?
s=80&d=mm&r=g)

## About the author

Software Developer & Technology Consultant

---

## Popular Categories

 * [Bible](https://immanuelraj.dev/category/bible/) (1)
 * [Cloudflare](https://immanuelraj.dev/category/cloudflare/) (1)
 * [Databases](https://immanuelraj.dev/category/databases/) (1)
 * [Docker](https://immanuelraj.dev/category/docker/) (1)
 * [Email](https://immanuelraj.dev/category/email/) (1)
 * [ERPNext](https://immanuelraj.dev/category/erpnext/) (3)
 * [Frappe](https://immanuelraj.dev/category/frappe/) (2)
 * [Github Actins](https://immanuelraj.dev/category/github-actins/) (1)
 * [God](https://immanuelraj.dev/category/god/) (1)
 * [Google Cloud](https://immanuelraj.dev/category/gcp/) (1)
 * [Hosting](https://immanuelraj.dev/category/hosting/) (2)
 * [Life](https://immanuelraj.dev/category/life/) (1)
 * [Linux](https://immanuelraj.dev/category/linux/) (13)
 * [ML](https://immanuelraj.dev/category/ml/) (1)
 * [Networking](https://immanuelraj.dev/category/networking/) (2)
 * [Security](https://immanuelraj.dev/category/security/) (2)
 * [Self Hosting](https://immanuelraj.dev/category/self-hosting/) (7)
 * [SSL](https://immanuelraj.dev/category/ssl/) (3)
 * [Terminal](https://immanuelraj.dev/category/terminal/) (1)
 * [Tools](https://immanuelraj.dev/category/tools/) (2)
 * [Uncategorized](https://immanuelraj.dev/category/uncategorized/) (8)
 * [Web](https://immanuelraj.dev/category/web/) (2)
 * [WordPress](https://immanuelraj.dev/category/wordpress/) (1)

---

## Useful Links

Links I found useful and wanted to share.

 * [Sponsor Me](https://github.com/sponsors/iamimmanuelraj)

---

## Search the website

Search