node package manager

pa11y-webservice

Pa11y Webservice provides scheduled accessibility reports for multiple URLs

Pa11y Webservice

Pa11y Webservice provides scheduled accessibility reports for multiple URLs. It runs Pa11y on a list of URLs, which you can update and query the results of via a JSON web-service.


✨ 🔜 ✨ The Pa11y team is very excited to announce plans for the successor to Pa11y Dashboard and Pa11y Webservice, codename "Sidekick". Help us define the features that you want to see by visiting the proposal. ✨


Pa11y Webservice requires Node.js 4+ and PhantomJS. See the Pa11y documentation for more information on these dependencies. Pa11y Webservice also requires MongoDB to be installed and running.

You'll then need to clone this repo locally and install dependencies with npm install. Now we need to add some configuration before we can run the application. We can do this in two ways:

Each configuration can be set with an environment variable rather than a config file. For example to run the application on port 8080 you can use the following:

PORT=8080 node index.js

The available configurations are documented here.

You'll need to copy and modify different config files depending on your environment (set with NODE_ENV):

cp config/development.sample.json config/development.json
cp config/production.sample.json config/production.json
cp config/test.sample.json config/test.json

Each of these files defines configurations for a different environment. If you're just running the application locally, then you should be OK with just development and test configurations. The available configurations are documented here.

Now that you've got your application configured, you can run in each mode by changing the NODE_ENV environment variable:

NODE_ENV=development node index.js

See development instructions for more information about running locally (and restarting automatically when files change).

The webservice which Pa11y Webservice exposes is documented in the wiki:

The boot configurations for Pa11y Webservice are as follows. Look at the sample JSON files in the repo for example usage.

(string) The mongodb connection string for your database. Set via a config file or the DATABASE environment variable.

(string) The host to run the application on. This is normally best left as "0.0.0.0" – which means the application will run on any incoming connections. Set via a config file or the HOST environment variable.

(number) The port to run the application on. Set via a config file or the PORT environment variable.

(string) A crontab which describes when to generate reports for each task in the application. Set via a config file or the CRON environment variable.

To develop Pa11y Webservice, you'll need to clone the repo and get set up as outlined in the setup guide.

You'll need to start the application in test mode with:

NODE_ENV=test node index.js

Now you'll be able to run the following commands:

make       # Run the lint and test tasks together 
make lint  # Run linters with the correct config 
make test  # Run integration tests 

Code with lint errors or failing tests will not be accepted, please use the build tools outlined above.

For demoing Pa11y Webservice, you can insert some example tasks and results by running one of the following commands (depending on your environment):

NODE_ENV=development make fixtures
NODE_ENV=test make fixtures

Pa11y Webservice major versions are normally supported for 6 months after their last minor release. This means that patch-level changes will be added and bugs will be fixed. The table below outlines the end-of-support dates for major versions, and the last minor release for that version.

We also maintain a migration guide to help you migrate.

Major Version Last Minor Release Node.js Versions Support End Date
❤️ 2 N/A 4+ N/A
1 1.11 0.10–6 2016-12-05

If you're opening issues related to these, please mention the version that the issue relates to.

Pa11y Webservice is licensed under the GNU General Public License 3.0.
Copyright © 2013–2016, Springer Nature