Compare commits

..

21 Commits
2.4.0 ... 3.2.0

Author SHA1 Message Date
Jose Bolos
ff8142b4e4 Version 3.2.0 (#270) 2020-10-05 17:35:43 +01:00
Jose Bolos
2f7e8ae451 Update dependencies (#269) 2020-10-05 17:04:12 +01:00
Sam Clulow
a2cc2c7942 Replace Chalk with Kleur (#264)
- Remove Chalk
- Add Kleur
- Update index.js
- Update copyright in README

Fixes #256
2020-06-29 16:27:44 +01:00
Jose Bolos
59f657b422 Update all devdependencies to the latest versions (#258) 2020-04-28 12:33:36 +01:00
Jose Bolos
ea3183791c Version 3.1.0 (#246)
* Version 3.1.0

Also minor bump to pa11y-webservice

* Bump webservice so it includes data fixtures
2019-09-27 11:44:24 +01:00
Jose Bolos
102a237d2e Bump webservice version and other deps (#245) 2019-09-20 15:59:21 +01:00
Jose Bolos
7c77467dcf Fix incorrect values being passed to ObjectID (#244)
Due to the routes being defined in the wrong order, certain urls (e.g. `/tasks/:taskid:/edit`) are being captured by the results route instead (e.g. `/tasks/:taskid:/:resultid:`). This is causing the wrong method to being called with parts of the path like `edit`, `run`, etc. being passed as an argument to ObjectID(). As these are not valid MongoDB IDs, the method displays instead an error message:

> Argument passed in must be a single String of 12 bytes or a string of 24 hex characters

Also change the path to the favicon image to be not relative, as this is causing a `favicon.png` string to be sent as an argument to ObjectID() when visiting certain pages due to the previous issue.
2019-09-20 14:57:15 +01:00
Jose Bolos
2de7e59f44 Bump webservice to 3.0.1 (#243)
Fixes a problem with tests not running when cron jobs are triggered.
2019-09-13 15:14:36 +01:00
Jeremy Englert
c7bd2a53b6 Adds new images to Readme (#239) 2019-08-01 09:20:02 +01:00
Jose Bolos
350f94a0d4 Version 3.0.0 (#236)
Includes several updates to the migration guide and the README.
2019-07-16 15:16:06 +01:00
Jose Bolos
a5ce220509 Update all dependencies and standardise versions (#235) 2019-07-16 14:08:27 +01:00
Jose Bolos
ce07206899 Update dependencies (#234)
* Bumps pa11y-webservice and client to the new versions requiring node 8+
* Update tests to account for the new URL. Integration tests now include a localhost URL, this updates the tests to reflect that.
* Increase test timeout to avoid travis failing
2019-07-16 13:41:39 +01:00
Juga Paazmaya
1609c8d667 Updates Node.js min version to 8 and removes npm as dependency (#228)
* Update Node.js min version to 8 and remove npm as dependency

* Test against Node.js 8 and 10 at Travis

* Add Node.js v12 in Travis
2019-05-15 12:32:20 +01:00
Jose Bolos
c1dcbf4436 Adds debugging info to startup log (#225)
There are two ways of setting a configuration for this app: config files, and environment variables. This makes it easy for the app to run with a different config from the one that you intend to run it with.

Currently, only the NODE_ENV variable and server url are being printed out on startup.

This PR adds the database config and the cron config to the details being displayed. This may help debug configuration issues, database issues, and specially making easier to understand what config is being used when for example running in a container.
2019-05-15 10:57:08 +01:00
James Loveridge
ef769d95e1 Add MongoDB installation instructions for Mac/Linux (#218) 2018-10-24 20:19:35 +01:00
Rowan Manning
1f685bafa2 Version 2.4.2 2018-06-21 11:40:50 +01:00
Frank van Gemeren
97413a26ab Update insecure dependencies. Fixes #210 partially (#211) 2018-06-21 11:36:46 +01:00
Mike Tanaka
edfd51a366 Make the rule name match the reported error so we can ignore it. (#209)
It's defined as WCAG2AA.Principle1.Guideline1_4.1_4_3.G18, but gets reported as WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
2018-05-11 10:48:03 +01:00
Frank van Gemeren
d96035a6ee Fix link target (#206) 2018-04-04 14:28:27 +01:00
Rowan Manning
93bea1dbac Version 2.4.1 2017-11-28 14:56:32 +00:00
Rowan Manning
7307fd6d61 Update pa11y-webservice to fix HTML CodeSniffer 2017-11-28 14:55:06 +00:00
12 changed files with 284 additions and 230 deletions

View File

@@ -1,3 +1,3 @@
'use strict';
module.exports = require('pa11y-lint-config/eslint/es6');
module.exports = require('pa11y-lint-config/eslint/es2017');

View File

@@ -3,9 +3,9 @@
language: node_js
matrix:
include:
- node_js: '4'
- node_js: '5'
- node_js: '6'
- node_js: '8'
- node_js: '10'
- node_js: '12'
# Build only master (and pull-requests)
branches:

View File

@@ -1,253 +1,285 @@
# Changelog
## 3.2.0 (2020-10-05)
* Update pa11y to version 5.3.0, which means better compatibility with sites using AMD modules
* Update pa11y-webservice to version 3.2.0, which adds the ability to configure the number of workers running pa11y tests
* Update several dependencies
* Replace chalk with kleur
## 3.1.0 (2019-09-27)
* Display the task ID before each line of output, so it's clear to which task a line of output belongs to when they run in parallel.
* Bump pa11y-webservice version, which fixes an issue with some pages failing to run.
* Fix incorrect routes passing an invalid value to Mongo's ObjectID.
## 3.0.0 (2019-07-16)
* Update pa11y to v5, which replaces Phantomjs with Headless Chrome
* Update dependencies
* Several bug fixes and documentation updates
* See the [migration guide](https://github.com/pa11y/pa11y-dashboard/blob/master/MIGRATION.md#migrating-from-20-to-30) for details of the breaking changes in this release
## 2.4.2 (2018-06-21)
* Update dependencies
* body-parser: ~1.17.1 to ^1.18.3
* compression: ~1.6 to ^1.7.2
* express: ~4.15.2 to ^4.16.3
* moment: ~2.15.2 to ^2.22.2
## 2.4.1 (2017-11-28)
* Update dependencies
* pa11y-webservice: ^2.3.0 to ^2.3.1
## 2.4.0 (2017-11-23)
* Add the ability to export the results graph as a PNG, see #197 for more information
* Add the ability to export the results graph as a PNG, see #197 for more information
## 2.3.0 (2017-10-31)
* Large overhaul of the results page, see #196 for more information
* Large overhaul of the results page, see #196 for more information
## 2.2.2 (2017-03-23)
* Upgrades `body-parser` and `express`. Fixes a vulnerability in `qs`: https://snyk.io/vuln/npm:qs:20170213
* Upgrades `body-parser` and `express`. Fixes a vulnerability in `qs`: https://snyk.io/vuln/npm:qs:20170213
## 2.2.1 (2017-02-07)
* Fix task editing when no actions are specified
* Fix task editing when no actions are specified
## 2.2.0 (2017-01-27)
* Add support for Pa11y actions
* Update dependencies
* pa11y-webservice: ~2.1.2 to ^2.3.0
* Add support for Pa11y actions
* Update dependencies
* pa11y-webservice: ~2.1.2 to ^2.3.0
## 2.1.2 (2016-12-12)
* Hide the "add" button in readonly mode
* Add a contributing guide
* Hide the "add" button in readonly mode
* Add a contributing guide
## 2.1.1 (2016-11-20)
* Use arrows instead of plus and minus for collapsibles/expanders
* Supply more detailed 500 messages
* Use arrows instead of plus and minus for collapsibles/expanders
* Supply more detailed 500 messages
## 2.1.0 (2016-11-07)
* Allow for configuration files to be JavaScript rather than JSON
* Allow setting of HTTP headers for task runs
* Allow hiding/ignoring elements for task runs
* Update dependencies and devDependencies
* pa11y-webservice: ~2.0.1 to ^2.1.2
* mocha: ^3 to ^2 (temporary tests weren't running)
* Allow for configuration files to be JavaScript rather than JSON
* Allow setting of HTTP headers for task runs
* Allow hiding/ignoring elements for task runs
* Update dependencies and devDependencies
* pa11y-webservice: ~2.0.1 to ^2.1.2
* mocha: ^3 to ^2 (temporary tests weren't running)
## 2.0.1 (2016-09-12)
* Update dependencies and devDependencies
* express: ~4.13 to ~4.14
* pa11y-webservice: ~2.0 to ^2.0.1
* request: ^2 to ^2.74
* mocha: ^2 to ^3
* pa11y-webservice-client-node: ~1.2 to ^1.2.1
This fixes the following vulnerabilities:
* https://nodesecurity.io/advisories/45
* https://nodesecurity.io/advisories/63
* https://nodesecurity.io/advisories/65
* https://nodesecurity.io/advisories/106
* https://nodesecurity.io/advisories/121
* https://nodesecurity.io/advisories/130
* Update dependencies and devDependencies
* express: ~4.13 to ~4.14
* pa11y-webservice: ~2.0 to ^2.0.1
* request: ^2 to ^2.74
* mocha: ^2 to ^3
* pa11y-webservice-client-node: ~1.2 to ^1.2.1
This fixes the following vulnerabilities:
* https://nodesecurity.io/advisories/45
* https://nodesecurity.io/advisories/63
* https://nodesecurity.io/advisories/65
* https://nodesecurity.io/advisories/106
* https://nodesecurity.io/advisories/121
* https://nodesecurity.io/advisories/130
## 2.0.0 (2016-06-05)
* Drop Node.js 0.100.12 support
* Update dependencies
* pa11y-webservice: ~1.11 to ~2.0
* See the [migration guide](https://github.com/pa11y/dashboard/blob/master/MIGRATION.md#migrating-from-10-to-20) for details
* Drop Node.js 0.100.12 support
* Update dependencies
* pa11y-webservice: ~1.11 to ~2.0
* See the [migration guide](https://github.com/pa11y/dashboard/blob/master/MIGRATION.md#migrating-from-10-to-20) for details
## 1.12.1 (2016-06-05)
* Update references/links after a repo rename
* Update references/links after a repo rename
## 1.12.0 (2016-05-26)
* Update Node.js version support to 0.106.0
* Update dependencies
* body-parser: added at ~1.15
* chalk: ~0.2 to ~1.1
* compression: added at ~1.6
* express: ~3.4 to ~4.13
* express-hbs: ~0.2 to ~1.0
* moment: ~2.2 to ~2.13
* pa11y-webservice: ~1.10 to ~1.11
* pa11y-webservice-client-node: ~1.1 to ~1.2
* bower: ~1.2 to ~1.7
* cheerio: added at ~0.20
* jsdom: removed
* request: ~2.27 to ^2
* uglify-js: ~2.4 to ~2.6
* Update Node.js version support to 0.106.0
* Update dependencies
* body-parser: added at ~1.15
* chalk: ~0.2 to ~1.1
* compression: added at ~1.6
* express: ~3.4 to ~4.13
* express-hbs: ~0.2 to ~1.0
* moment: ~2.2 to ~2.13
* pa11y-webservice: ~1.10 to ~1.11
* pa11y-webservice-client-node: ~1.1 to ~1.2
* bower: ~1.2 to ~1.7
* cheerio: added at ~0.20
* jsdom: removed
* request: ~2.27 to ^2
* uglify-js: ~2.4 to ~2.6
## 1.11.0 (2016-05-23)
* Add the ability to configure task wait times
* Allow configuration by environment variables
* Update repository references to the new Pa11y organisation
* Add a changelog
* Add the ability to configure task wait times
* Allow configuration by environment variables
* Update repository references to the new Pa11y organisation
* Add a changelog
## 1.10.0 (2016-05-18)
* Automatically focus on the filter input box when you select the filter
* Make a task URL clickable
* Tweak the documentation to make it more usable
* Add a resources section to the README
* Automatically focus on the filter input box when you select the filter
* Make a task URL clickable
* Tweak the documentation to make it more usable
* Add a resources section to the README
## 1.9.0 (2016-04-25)
* Show errors' context and selector on the results page
* Add context and selector to CSV output
* Fix lint errors
* Switch from Grunt to Make
* Add a `SIGINT` handler
* Update dependencies
* pa11y-webservice: ~1.6 to ~1.8
* Show errors' context and selector on the results page
* Add context and selector to CSV output
* Fix lint errors
* Switch from Grunt to Make
* Add a `SIGINT` handler
* Update dependencies
* pa11y-webservice: ~1.6 to ~1.8
## 1.8.2 (2016-02-10)
* Update the license in the footer
* Update the license in the footer
## 1.8.1 (2016-02-10)
* Update repository references to springernature
* Update repository references to springernature
## 1.8.0 (2016-02-04)
* Make the graph more accessible to color-blind users
* Fix lint errors
* Make the graph more accessible to color-blind users
* Fix lint errors
## 1.7.0 (2016-01-29)
* Hide the date list from individual result pages
* Make the date selector properly keyboard accessible
* Change the options button into a more accessible list
* Make the errors/warnings/notices lists keyboard accessible
* Hide the date list from individual result pages
* Make the date selector properly keyboard accessible
* Change the options button into a more accessible list
* Make the errors/warnings/notices lists keyboard accessible
## 1.6.1 (2016-01-26)
* Add keyboard access for filters
* Fix lint errors
* Add keyboard access for filters
* Fix lint errors
## 1.6.0 (2015-08-20)
* Hide all graph data except for errors by default
* Hide all graph data except for errors by default
## 1.5.0 (2015-07-06)
* Add the ability to use HTTP basic auth with task URLs
* Update dependencies
* pa11y-webservice: ~1.5 to ~1.6
* Add the ability to use HTTP basic auth with task URLs
* Update dependencies
* pa11y-webservice: ~1.5 to ~1.6
## 1.4.0 (2015-07-02)
* Add the ability to set a per-task timeout
* Add the ability to set a per-task timeout
## 1.3.2 (2015-01-17)
* Update dependencies
* pa11y-webservice: ~1.3 to ~1.4
* Update dependencies
* pa11y-webservice: ~1.3 to ~1.4
## 1.3.1 (2014-03-05)
* Fix the URL filter position when in demo mode
* Fix the URL filter position when in demo mode
## 1.3.0 (2014-03-04)
* Add filtering of tasks on the home page
* Add the ability to ignore certain rules
* Add the ability to ignore a rule from the result page
* Tweak the display of task cards
* Add filtering of tasks on the home page
* Add the ability to ignore certain rules
* Add the ability to ignore a rule from the result page
* Tweak the display of task cards
## 1.2.3 (2014-01-13)
* Fix CSV export for the OS X version of Excel
* Fix CSV export for the OS X version of Excel
## 1.2.2 (2014-01-09)
* Fix spacing issues when the graph is not visible
* Add notes on publishing a release
* Fix spacing issues when the graph is not visible
* Add notes on publishing a release
## 1.2.1 (2014-01-08)
* Fix dropdown positioning in Internet Explorer 7 and 8
* Fix dropdown positioning in Internet Explorer 7 and 8
## 1.2.0 (2013-12-12)
* Add HTML Codesniffer links on the results page
* Display the ignore rules for results on the results page
* Link the breadcrumbs on task sub-pages
* Fix an issue with saving empty ignore rules
* Cache-bust the CSS and JavaScript
* Add the ability to edit tasks
* Fix lint errors
* Tweaks to the display of the graphs
* Update dependencies
* pa11y-webservice: ~1.1 to ~1.2
* pa11y-webservice-client-node: ~1.0 to ~1.1
* Add HTML Codesniffer links on the results page
* Display the ignore rules for results on the results page
* Link the breadcrumbs on task sub-pages
* Fix an issue with saving empty ignore rules
* Cache-bust the CSS and JavaScript
* Add the ability to edit tasks
* Fix lint errors
* Tweaks to the display of the graphs
* Update dependencies
* pa11y-webservice: ~1.1 to ~1.2
* pa11y-webservice-client-node: ~1.0 to ~1.1
## 1.1.0 (2013-11-22)
* Add a functional test suite
* Allow the webservice to run automatically
* Documentation improvements
* Add a Travis config
* Fix lint errors
* Add a functional test suite
* Allow the webservice to run automatically
* Documentation improvements
* Add a Travis config
* Fix lint errors
## 1.0.0 (2013-11-19)
* Initial stable release
* Add the ability to set a site-wide message
* Add a demo mode for demo/public-facing sites
* Disable search engine indexing by default
* Tweak the task header at smaller screen sizes
* Make checkboxes on the graph WCAG2AA compliant
* Make checkbox inputs and labels WCAG2AA compliant on new URL page
* Colour changes to ensure there are no contrast issues
* Make the copy more consistent
* Update screenshots
* Update dependencies
* pa11y-webservice-client-node: 1.0.0-beta.7 to ~1.0
* Initial stable release
* Add the ability to set a site-wide message
* Add a demo mode for demo/public-facing sites
* Disable search engine indexing by default
* Tweak the task header at smaller screen sizes
* Make checkboxes on the graph WCAG2AA compliant
* Make checkbox inputs and labels WCAG2AA compliant on new URL page
* Colour changes to ensure there are no contrast issues
* Make the copy more consistent
* Update screenshots
* Update dependencies
* pa11y-webservice-client-node: 1.0.0-beta.7 to ~1.0
## 1.0.0-beta.3 pre-release (2013-11-12)
* Fix lint errors
* Add descriptive labels to tasks
* Add a name field to "New URL" form
* Add a WCAG 2.0 link to the footer
* Tweak the layout at smaller screen sizes
* Notify users when there are no ignored rules
* Fix the expires headers for front end assets
* Move from Make to Grunt
* Compress static files
* Minify the site JavaScript
* Compile LESS files with grunt
* Add a watch task to recompile assets on change
* Commit compiled front-end code to the repo
* Add development instructions
* Update screenshots
* Update dependencies
* pa11y-webservice-client-node: 1.0.0-beta.4 to 1.0.0-beta.7
* Fix lint errors
* Add descriptive labels to tasks
* Add a name field to "New URL" form
* Add a WCAG 2.0 link to the footer
* Tweak the layout at smaller screen sizes
* Notify users when there are no ignored rules
* Fix the expires headers for front end assets
* Move from Make to Grunt
* Compress static files
* Minify the site JavaScript
* Compile LESS files with grunt
* Add a watch task to recompile assets on change
* Commit compiled front-end code to the repo
* Add development instructions
* Update screenshots
* Update dependencies
* pa11y-webservice-client-node: 1.0.0-beta.4 to 1.0.0-beta.7
## 1.0.0-beta.2 pre-release (2013-10-04)
* Add screenshots to the README
* Fix margins
* Add bower package management
* Stop the graph from appearing if there's only one result
* Add the ability to run tasks ad-hoc
* Add more useful information to the footer
* General copy edits
* Update dependencies
* pa11y-webservice-client-node: 1.0.0-beta.3 to 1.0.0-beta.4
* Add screenshots to the README
* Fix margins
* Add bower package management
* Stop the graph from appearing if there's only one result
* Add the ability to run tasks ad-hoc
* Add more useful information to the footer
* General copy edits
* Update dependencies
* pa11y-webservice-client-node: 1.0.0-beta.3 to 1.0.0-beta.4
## 1.0.0-beta.1 pre-release (2013-09-27)
* Initial release
* Initial release

View File

@@ -1,18 +1,29 @@
Migration Guide
===============
# Migration Guide
Pa11y Dashboard's API changes between major versions. This is a guide to help you make the switch when this happens.
## Table of Contents
Table Of Contents
-----------------
- [Migrating from 2.0 to 3.0](#migrating-from-20-to-30)
- [Migrating from 1.0 to 2.0](#migrating-from-10-to-20)
## Migrating from 2.0 to 3.0
Migrating from 1.0 to 2.0
-------------------------
### PhantomJS to Headless Chrome
Pa11y Dashboard 3 uses version 5 of Pa11y, which replaces PhantomJS with [Headless Chrome](https://developers.google.com/web/updates/2017/04/headless-chrome). This allows us to use more modern JavaScript APIs and make Pa11y testing more stable.
As a result of this change, [Pa11y Dashboard's requirements](../README.md#requirements) have changed, and you may need to install additional dependencies required by Chrome before being able to use this version.
### Node.js Support
Pa11y Webservice 3 requires Node.js version 8 or greater. Versions 4 and 6 are not supported any more.
### Miscellaneous
The default viewport dimensions for Pa11y have been changed from `1024x768` to `1280x1024`. This could make pa11y report a different number of errors if different content appears on the page based on its width, so results obtained with v2 and v3 may not be comparable.
## Migrating from 1.0 to 2.0
### Node.js Support

View File

@@ -21,7 +21,7 @@
NPM_BIN = ./node_modules/.bin
export PATH := $(NPM_BIN):$(PATH)
export EXPECTED_COVERAGE := 90
export INTEGRATION_TIMEOUT := 5000
export INTEGRATION_TIMEOUT := 10000
export INTEGRATION_SLOW := 4000

View File

@@ -1,5 +1,4 @@
Pa11y Dashboard
===============
# Pa11y Dashboard
Pa11y Dashboard is a web interface to the [Pa11y][pa11y] accessibility reporter; allowing you to focus on *fixing* issues rather than hunting them down.
@@ -8,27 +7,39 @@ Pa11y Dashboard is a web interface to the [Pa11y][pa11y] accessibility reporter;
[![Build status][shield-build]][info-build]
[![GPL-3.0 licensed][shield-license]][info-license]
---
## Latest news from Pa11y
✨ 🔜 ✨ 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][sidekick-proposal]. ✨
![dashboard](https://user-images.githubusercontent.com/6110968/61603347-0bce1000-abf2-11e9-87b2-a53f91d315bb.jpg)
![results-page](https://user-images.githubusercontent.com/6110968/62183438-05851580-b30f-11e9-9bc4-b6a4823ae9e8.jpg)
---
## Requirements
![dashboard](https://f.cloud.github.com/assets/1225142/1549567/f0361e72-4de8-11e3-8d14-3fe6900cc15d.jpg)
![results-page](https://f.cloud.github.com/assets/1225142/1549568/f225aa54-4de8-11e3-8b25-ef2f405997a3.jpg)
Pa11y Dashboard is a [Node.js][node] application and requires a stable or LTS version of Node, currently version 8 or greater.
Pa11y Dashboard also requires a [MongoDB][mongo] database to be available so it can store the results of the tests. The database doesn't have to be in the same server or computer where Pa11y Dashboard is running from.
Setup
-----
Since version 3, Pa11y Dashboard uses Headless Chrome in order to run the tests. This means that additional dependencies maybe be required.
Pa11y Dashboard requires [Node.js][node] 4+. See the [Pa11y][pa11y] documentation for detailed instructions on how to install this on your operating system.
In [Unix-like](https://en.wikipedia.org/wiki/Unix-like) systems you may need to install the `libnss3` and `libgconf-2-4` libraries in order to be able to run Chrome. If you're trying to run the app in a headless environment (e.g. the cloud, or a headless server), you may also need to configure Xvfb before. Please refer to the documentation from your provider for details on how to do this.
You'll also need to have [MongoDB][mongo] installed and running. See the [MongoDB install guide][mongo-install] for more information on this.
## Setup
You'll then need to clone this repo locally and install dependencies with `npm install`. Now you need to add some configuration before you can run the application. We can do this in two ways:
In order to run Pa11y Dashboard, we recommend cloning this repository locally:
```sh
git clone https://github.com/pa11y/pa11y-dashboard.git
```
Then installing the dependencies:
```sh
cd pa11y-dashboard
npm install
```
You'll also need to have [MongoDB][mongo] installed and running. For quick access, you can install via a package manager such as on Mac OS `brew install mongodb` or on Linux (Debian) it would be `apt-get install mongodb`. To run MongoDB, you can run `mongod` in the command line. See the [MongoDB install guide][mongo-install] for more detailed information.
The last step before being able to run the application is to define a configuration for it. This can be done in two ways:
### Option 1: Using Environment Variables
@@ -58,13 +69,11 @@ Now that you've got your application configured, make sure you have a MongoDB se
NODE_ENV=development node index.js
```
See [development instructions](#development) for more information about running locally (and restarting automatically when files change).
See [Contributing](#contributing) for more information about running locally (and restarting automatically when files change).
If you run into problems, check the [troubleshooting guide][troubleshooting].
Configurations
--------------
## Configurations
The boot configurations for Pa11y Dashboard are as follows. Look at the sample JSON files in the repo for example usage.
@@ -83,9 +92,7 @@ The boot configurations for Pa11y Dashboard are as follows. Look at the sample J
### webservice
This can either be an object containing [Pa11y Webservice configurations][pa11y-webservice-config], or a string which is the base URL of a [Pa11y Webservice][pa11y-webservice] instance you are running separately. If using environment variables, prefix the webservice vars with `WEBSERVICE_`.
Contributing
------------
## Contributing
There are many ways to contribute to Pa11y Dashboard, we cover these in the [contributing guide](CONTRIBUTING.md) for this repo.
@@ -110,14 +117,12 @@ make less # Compile the site CSS from LESS files
make uglify # Compile and uglify the client-side JavaScript
```
## Useful Resources
Useful Resources
-------
* [Setting up An Accessibility Dashboard from Scratch with Pa11y on DigitalOcean](https://una.im/pa11y-dash/)
* [Monitoring Web Accessibility Compliance With Pa11y Dashboard](https://www.lullabot.com/articles/monitoring-web-accessibility-compliance-with-pa11y-dashboard)
Support and Migration
---------------------
## Support and Migration
Pa11y Dashboard 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.
@@ -125,19 +130,16 @@ We also maintain a [migration guide](MIGRATION.md) to help you migrate.
| :grey_question: | Major Version | Last Minor Release | Node.js Versions | Support End Date |
| :-------------- | :------------ | :----------------- | :--------------- | :--------------- |
| :heart: | 2 | N/A | 4+ | N/A |
| :heart: | 3 | N/A | 8+ | N/A |
| :hourglass: | 2 | 2.4.2 | 4+ | 2020-01-16 |
| :skull: | 1 | 1.12 | 0.106 | 2016-12-05 |
If you're opening issues related to these, please mention the version that the issue relates to.
License
-------
## License
Pa11y Dashboard is licensed under the [GNU General Public License 3.0][info-license].<br/>
Copyright &copy; 20132017, Team Pa11y
Copyright &copy; 20132020, Team Pa11y and contributors
[gpl]: http://www.gnu.org/licenses/gpl-3.0.html
[mongo]: http://www.mongodb.org/
@@ -151,10 +153,10 @@ Copyright &copy; 20132017, Team Pa11y
[travis-img]: https://travis-ci.org/pa11y/dashboard.png?branch=master
[troubleshooting]: https://github.com/pa11y/dashboard/blob/master/TROUBLESHOOTING.md
[info-license]: LICENSE
[info-node]: package.json
[info-build]: https://travis-ci.org/pa11y/pa11y-dashboard
[shield-license]: https://img.shields.io/badge/license-GPL%203.0-blue.svg
[shield-node]: https://img.shields.io/badge/node.js%20support-46-brightgreen.svg
[shield-version]: https://img.shields.io/badge/version-2.4.0-blue.svg
[info-license]: LICENSE
[shield-version]: https://img.shields.io/github/package-json/v/pa11y/pa11y-dashboard.svg
[shield-node]: https://img.shields.io/node/v/pa11y/pa11y-dashboard.svg
[shield-build]: https://img.shields.io/travis/pa11y/pa11y-dashboard/master.svg
[shield-license]: https://img.shields.io/badge/license-GPL%203.0-blue.svg

3
app.js
View File

@@ -93,7 +93,6 @@ function initApp(config, callback) {
// Load routes
require('./route/index')(app);
require('./route/task/index')(app);
require('./route/result/index')(app);
require('./route/result/download')(app);
if (!config.readonly) {
require('./route/new')(app);
@@ -103,6 +102,8 @@ function initApp(config, callback) {
require('./route/task/ignore')(app);
require('./route/task/unignore')(app);
}
// Needs to be loaded after `/route/task/edit`
require('./route/result/index')(app);
// Error handling
app.express.get('*', (request, response) => {

View File

@@ -910,7 +910,7 @@ function getStandards() {
description: 'If any audio plays automatically for longer than 3 seconds, check that there is the ability to pause, stop or mute the audio.'
},
{
name: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18',
name: 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail',
description: 'This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of /{value/}. Recommendation: /{colour recommendations/}.'
},
{

View File

@@ -14,7 +14,7 @@
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
const chalk = require('chalk');
const kleur = require('kleur');
const config = require('./config');
process.on('SIGINT', () => {
@@ -29,16 +29,16 @@ require('./app')(config, (error, app) => {
}
console.log('');
console.log(chalk.underline.magenta('Pa11y Dashboard started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), app.address);
console.log(kleur.underline().magenta('Pa11y Dashboard started'));
console.log(kleur.grey('mode: %s'), process.env.NODE_ENV);
console.log(kleur.grey('uri: %s'), app.address);
app.on('route-error', error => {
const stack = (error.stack ? error.stack.split('\n') : [error.message]);
const msg = chalk.red(stack.shift());
const msg = kleur.red(stack.shift());
console.error('');
console.error(msg);
console.error(chalk.grey(stack.join('\n')));
console.error(kleur.grey(stack.join('\n')));
});
// Start the webservice if required
@@ -50,9 +50,11 @@ require('./app')(config, (error, app) => {
}
console.log('');
console.log(chalk.underline.cyan('Pa11y Webservice started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
console.log(kleur.underline().cyan('Pa11y Webservice started'));
console.log(kleur.grey('mode: %s'), process.env.NODE_ENV);
console.log(kleur.grey('uri: %s'), webservice.server.info.uri);
console.log(kleur.grey('database: %s'), config.webservice.database);
console.log(kleur.grey('cron: %s'), config.webservice.cron);
});
}

View File

@@ -1,6 +1,6 @@
{
"name": "pa11y-dashboard",
"version": "2.4.0",
"version": "3.2.0",
"private": true,
"description": "Pa11y Dashboard is a visual web interface to the Pa11y accessibility reporter",
"keywords": [
@@ -21,30 +21,31 @@
"bugs": "https://github.com/pa11y/dashboard/issues",
"license": "GPL-3.0",
"engines": {
"node": ">=4"
"node": ">=8",
"npm": ">=6"
},
"dependencies": {
"body-parser": "~1.17.1",
"chalk": "~1.1",
"compression": "~1.6",
"express": "~4.15.2",
"express-hbs": "~1.0",
"http-headers": "^3.0.1",
"moment": "~2.15.2",
"pa11y-webservice": "^2.3.0",
"pa11y-webservice-client-node": "^1.2.1",
"underscore": "~1.8"
"body-parser": "~1.19.0",
"compression": "~1.7.4",
"express": "~4.17.1",
"express-hbs": "~2.1.2",
"http-headers": "~3.0.2",
"kleur": "~4.1.2",
"moment": "~2.29.0",
"pa11y-webservice": "~3.2.0",
"pa11y-webservice-client-node": "~2.0.0",
"underscore": "~1.11.0"
},
"devDependencies": {
"bower": "~1.7",
"cheerio": "~0.20",
"eslint": "^3.18.0",
"less": "~2.7",
"mocha": "^2",
"pa11y-lint-config": "^1.0.0",
"proclaim": "^3",
"request": "^2.74",
"uglify-js": "~2.6"
"bower": "^1.8.8",
"cheerio": "^1.0.0-rc.3",
"eslint": "^6.8.0",
"less": "^3.11.1",
"mocha": "^7.2.0",
"pa11y-lint-config": "^1.2.1",
"proclaim": "^3.6.0",
"request": "^2.88.2",
"uglify-js": "^3.11.0"
},
"scripts": {
"start": "node index.js",

View File

@@ -40,10 +40,11 @@ describe.only('GET /', function() {
it('should display all of the expected tasks', function() {
const tasks = this.last.dom('[data-test=task]');
assert.strictEqual(tasks.length, 3);
assert.strictEqual(tasks.length, 4);
assert.match(tasks.eq(0).text(), /npg home\s+\(wcag2aa\)/i);
assert.match(tasks.eq(1).text(), /npg home\s+\(wcag2aaa\)/i);
assert.match(tasks.eq(2).text(), /nature news\s+\(section508\)/i);
assert.match(tasks.eq(3).text(), /z integration test\s+\(wcag2aa\)/i);
});
it('should have links to each task', function() {
@@ -51,6 +52,7 @@ describe.only('GET /', function() {
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003"]').length, 1);
assert.strictEqual(tasks.eq(3).find('[href="/abc000000000000000000004"]').length, 1);
});
it('should display an "Edit" button for each task', function() {
@@ -58,6 +60,7 @@ describe.only('GET /', function() {
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001/edit"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002/edit"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003/edit"]').length, 1);
assert.strictEqual(tasks.eq(3).find('[href="/abc000000000000000000004/edit"]').length, 1);
});
it('should display a "Delete" button for each task', function() {
@@ -65,6 +68,7 @@ describe.only('GET /', function() {
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001/delete"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002/delete"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003/delete"]').length, 1);
assert.strictEqual(tasks.eq(3).find('[href="/abc000000000000000000004/delete"]').length, 1);
});
it('should display a "Run" button for each task', function() {
@@ -72,6 +76,7 @@ describe.only('GET /', function() {
assert.strictEqual(tasks.eq(0).find('[href="/abc000000000000000000001/run"]').length, 1);
assert.strictEqual(tasks.eq(1).find('[href="/abc000000000000000000002/run"]').length, 1);
assert.strictEqual(tasks.eq(2).find('[href="/abc000000000000000000003/run"]').length, 1);
assert.strictEqual(tasks.eq(3).find('[href="/abc000000000000000000004/run"]').length, 1);
});
it('should display the task result counts if the task has been run', function() {

View File

@@ -27,7 +27,7 @@ along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
{{#if noindex}}<meta name="robots" content="noindex"/>{{/if}}
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="icon" type="image/png" href="/favicon.png" />
<!-- For mobile devices. -->
<meta name="viewport" content="width=device-width"/>