Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pa11y

Package Overview
Dependencies
Maintainers
9
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pa11y - npm Package Compare versions

Comparing version 7.0.0 to 8.0.0

4

bin/pa11y.js

@@ -9,3 +9,3 @@ #!/usr/bin/env node

const pkg = require('../package.json');
const program = require('commander');
const {program} = require('commander');
const pa11y = require('../lib/pa11y');

@@ -232,3 +232,3 @@ const semver = require('semver');

* @param {String} reporterName - Name of the reporter
* @param {String} reporterSupportString - List of supported versions, e.g. '^7.0.0'
* @param {String} reporterSupportString - List of supported versions, e.g. '^8.0.0'
* @param {String} pa11yVersion - This version of pa11y

@@ -235,0 +235,0 @@ * @returns {void}

@@ -8,3 +8,2 @@ 'use strict';

const pkg = require('../package.json');
const promiseTimeout = require('p-timeout');
const puppeteer = require('puppeteer');

@@ -37,9 +36,6 @@ const semver = require('semver');

// a timeout if it takes too long
pa11yResults = await promiseTimeout(
runPa11yTest(url, options, state),
options.timeout,
`Pa11y timed out (${options.timeout}ms)`
);
pa11yResults = await runPa11yTest(url, options, state, {
signal: AbortSignal.timeout(options.timeout)
});
} catch (error) {
// Capture error if a callback is provided, otherwise reject with error
if (callback) {

@@ -109,4 +105,4 @@ pa11yError = error;

} else if (state.page) {
state.page.removeListener('request', state.requestInterceptCallback);
state.page.removeListener('console', state.consoleCallback);
state.page.off('request', state.requestInterceptCallback);
state.page.off('console', state.consoleCallback);
if (state.autoClosePage) {

@@ -113,0 +109,0 @@ await state.page.close();

@@ -8,3 +8,3 @@ 'use strict';

// Pa11y version support
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -11,0 +11,0 @@ // Helper strings for use in reporter methods

@@ -6,3 +6,3 @@ 'use strict';

// Pa11y version support
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -9,0 +9,0 @@ // Output formatted results

@@ -12,3 +12,3 @@ 'use strict';

// Pa11y version support
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -15,0 +15,0 @@ // Compile template and output formatted results

@@ -8,3 +8,3 @@ 'use strict';

// Pa11y version support
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -11,0 +11,0 @@ // Output formatted results

@@ -6,3 +6,3 @@ 'use strict';

// Pa11y version support
report.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
report.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -9,0 +9,0 @@ // Output formatted results

@@ -13,3 +13,3 @@ 'use strict';

*/
runner.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
runner.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -16,0 +16,0 @@ /**

@@ -10,3 +10,3 @@ 'use strict';

*/
runner.supports = '^7.0.0 || ^7.0.0-alpha || ^7.0.0-beta';
runner.supports = '^8.0.0 || ^8.0.0-alpha || ^8.0.0-beta';

@@ -13,0 +13,0 @@ /**

{
"name": "pa11y",
"version": "7.0.0",
"version": "8.0.0",
"description": "Pa11y is your automated accessibility testing pal",

@@ -35,6 +35,6 @@ "keywords": [

"dependencies": {
"axe-core": "~4.8.2",
"axe-core": "~4.8.4",
"bfj": "~8.0.0",
"commander": "~11.1.0",
"envinfo": "~7.11.0",
"commander": "~12.0.0",
"envinfo": "~7.11.1",
"html_codesniffer": "~2.5.1",

@@ -44,11 +44,14 @@ "kleur": "~4.1.5",

"node.extend": "~2.0.3",
"p-timeout": "~4.1.0",
"puppeteer": "^20.9.0",
"semver": "~7.5.4"
"puppeteer": "^22.3.0",
"semver": "~7.6.0"
},
"devDependencies": {
"eslint": "^8.52.0",
"eslint-plugin-jest": "^27.6.0",
"jest": "^29.7.0",
"pa11y-lint-config": "^3.0.0"
"c8": "^9.1.0",
"eslint": "^8.57.0",
"eslint-plugin-mocha": "^10.4.1",
"mocha": "^10.3.0",
"mockery": "^2.1.0",
"pa11y-lint-config": "^3.0.0",
"proclaim": "^3.6.0",
"sinon": "^17.0.1"
},

@@ -61,6 +64,7 @@ "main": "./lib/pa11y.js",

"lint": "eslint .",
"test-unit": "jest test/unit",
"test-coverage": "jest test/unit --coverage",
"test-integration": "jest test/integration",
"test": "jest --coverage"
"test": "npm run test-coverage && npm run verify-coverage && npm run test-integration",
"test-coverage": "c8 -- npm run test-unit",
"test-integration": "mocha --config test/integration/.mocharc.json",
"test-unit": "mocha",
"verify-coverage": "c8 check-coverage --lines 90 --functions 90 --branches 90"
},

@@ -67,0 +71,0 @@ "files": [

@@ -28,3 +28,3 @@ # Pa11y

Pa11y 7 requires [Node.js][node] 18 or 20 to run. An older version of Node.js can be used with a [previous major version](#support-and-migration) of Pa11y.
Pa11y 8 requires [Node.js][node] 18 or 20. An older version of Node.js can be used with [Pa11y 6 or below](#support-and-migration).

@@ -41,3 +41,3 @@ ### Linux and macOS

Alternatively, you can also download pre-built packages from the [Node.js][node] website for your operating system.
Alternatively, download a pre-built package from the [Node.js][node] website for your operating system.

@@ -56,5 +56,5 @@ ### Windows

This installs the `pa11y` command-line tool:
```console
$ pa11y --help
```sh
Usage: pa11y [options] <url>

@@ -190,3 +190,3 @@

```js
exports.supports = '^7.0.0';
exports.supports = '^8.0.0';
```

@@ -256,3 +256,3 @@

If you wish to transform these results with the command-line reporters, then you can do so in your code by requiring them in. The `csv`, `tsv`, `html`, `json`, and `markdown` reporters each expose a method `process`:
If you wish to transform these results with a command-line reporter, `require` it into your code. The `csv`, `tsv`, `html`, `json`, and `markdown` reporters each expose a method `process`:

@@ -268,3 +268,3 @@ ```js

Pa11y uses promises, so you can use `async` functions and the `await` keyword:
Pa11y uses promises, so you can use `async` functions and the `await` keyword:

@@ -297,6 +297,4 @@ ```js

Pa11y exposes a function which allows you to validate [action](#actions) strings before attempting to use them.
Pa11y's `isValidAction` function can be used to validate an [action](#actions) string ahead of its use:
This function accepts an action string and returns a boolean indicating whether it matches one of the actions that Pa11y supports:
```js

@@ -863,3 +861,3 @@ pa11y.isValidAction('click element #submit'); // true

```js
exports.supports = '^7.0.0';
exports.supports = '^8.0.0';
```

@@ -942,3 +940,3 @@

npm run test-integration # Run the integration tests alone
npm run coverage # Run the unit tests alone, reporting coverage
npm run test-coverage # Run the unit tests alone, reporting coverage
```

@@ -955,11 +953,12 @@

| Major version | Final minor version | Node.js support | Support end date |
| :------------ | :-------------------- | :--------------- | :--------------- |
| `7` | | `18`, `20` | ✅ Current major version |
| `6` | `6.2` | `12`, `14`, `16` | July 2024 |
| `5` | `5.3` | `8`, `10`, `12` | 2021-11-25 |
| `4` | `4.13` | `4`, `6`, `8` | 2018-08-15 |
| `3` | `3.8` | `0.12`, `4` | 2016-12-05 |
| `2` | `2.4` | `0.10`, `0.12` | 2016-10-16 |
| `1` | `1.7` | `0.10` | 2016-06-08 |
| Major version | Final minor version | Node.js support | Puppeteer version | Support end date |
| :------------ | :------------------ | :--------------- | :---------------- | :----------------------- |
| `8` | | `18`, `20` | `^22` | ✅ Current major version |
| `7` | `7.0` | `18`, `20` | `^20` | October 2024 |
| `6` | `6.2` | `12`, `14`, `16` | `~9.1` | July 2024 |
| `5` | `5.3` | `8`, `10`, `12` | `^1` | 2021-11-25 |
| `4` | `4.13` | `4`, `6`, `8` | | 2018-08-15 |
| `3` | `3.8` | `0.12`, `4` | | 2016-12-05 |
| `2` | `2.4` | `0.10`, `0.12` | | 2016-10-16 |
| `1` | `1.7` | `0.10` | | 2016-06-08 |

@@ -969,3 +968,3 @@ ## License

Pa11y is licensed under the [Lesser General Public License (LGPL-3.0-only)][info-license].
Copyright &copy; 2013–2024, Team Pa11y and contributors
Copyright &copy; 2013-2024, Team Pa11y and contributors

@@ -972,0 +971,0 @@ [axe]: https://www.axe-core.org/

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc