forked from external-repos/pa11y-dashboard
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea3183791c | ||
![]() |
102a237d2e | ||
![]() |
7c77467dcf | ||
![]() |
2de7e59f44 | ||
![]() |
c7bd2a53b6 | ||
![]() |
350f94a0d4 | ||
![]() |
a5ce220509 | ||
![]() |
ce07206899 | ||
![]() |
1609c8d667 | ||
![]() |
c1dcbf4436 | ||
![]() |
ef769d95e1 |
@@ -1,3 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('pa11y-lint-config/eslint/es6');
|
||||
module.exports = require('pa11y-lint-config/eslint/es2017');
|
||||
|
@@ -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:
|
||||
|
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,6 +1,19 @@
|
||||
|
||||
# Changelog
|
||||
|
||||
## 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
|
||||
|
27
MIGRATION.md
27
MIGRATION.md
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
72
README.md
72
README.md
@@ -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]. ✨
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||

|
||||

|
||||
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
|
||||
|
||||
@@ -62,9 +73,7 @@ See [Contributing](#contributing) for more information about running locally (an
|
||||
|
||||
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.10–6 | 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 © 2013–2017, Team Pa11y
|
||||
|
||||
|
||||
Copyright © 2013–2019, Team Pa11y and contributors
|
||||
|
||||
[gpl]: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
[mongo]: http://www.mongodb.org/
|
||||
@@ -151,10 +153,10 @@ Copyright © 2013–2017, 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-4–6-brightgreen.svg
|
||||
[shield-version]: https://img.shields.io/badge/version-2.4.2-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
3
app.js
@@ -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) => {
|
||||
|
6
index.js
6
index.js
@@ -51,8 +51,10 @@ 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(chalk.grey('mode: %s'), process.env.NODE_ENV);
|
||||
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
|
||||
console.log(chalk.grey('database: %s'), config.webservice.database);
|
||||
console.log(chalk.grey('cron: %s'), config.webservice.cron);
|
||||
});
|
||||
}
|
||||
|
||||
|
44
package.json
44
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pa11y-dashboard",
|
||||
"version": "2.4.2",
|
||||
"version": "3.1.0",
|
||||
"private": true,
|
||||
"description": "Pa11y Dashboard is a visual web interface to the Pa11y accessibility reporter",
|
||||
"keywords": [
|
||||
@@ -21,31 +21,31 @@
|
||||
"bugs": "https://github.com/pa11y/dashboard/issues",
|
||||
"license": "GPL-3.0",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
"node": ">=8",
|
||||
"npm": ">=6"
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.18.3",
|
||||
"chalk": "~1.1",
|
||||
"compression": "^1.7.2",
|
||||
"express": "^4.16.3",
|
||||
"express-hbs": "~1.0",
|
||||
"http-headers": "^3.0.1",
|
||||
"moment": "^2.22.2",
|
||||
"npm": "^6.1.0",
|
||||
"pa11y-webservice": "^2.3.1",
|
||||
"pa11y-webservice-client-node": "^1.2.1",
|
||||
"underscore": "~1.8"
|
||||
"body-parser": "~1.19.0",
|
||||
"chalk": "~2.4.2",
|
||||
"compression": "~1.7.4",
|
||||
"express-hbs": "~2.1.2",
|
||||
"express": "~4.17.1",
|
||||
"http-headers": "~3.0.2",
|
||||
"moment": "~2.24.0",
|
||||
"pa11y-webservice-client-node": "~2.0.0",
|
||||
"pa11y-webservice": "~3.1.2",
|
||||
"underscore": "~1.9.1"
|
||||
},
|
||||
"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.4.0",
|
||||
"less": "^3.10.3",
|
||||
"mocha": "^6.2.0",
|
||||
"pa11y-lint-config": "^1.2.1",
|
||||
"proclaim": "^3.6.0",
|
||||
"request": "^2.88.0",
|
||||
"uglify-js": "^3.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
|
@@ -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() {
|
||||
|
@@ -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"/>
|
||||
|
Reference in New Issue
Block a user