Gathering detailed insights and metrics for gulp-pa11y
Gathering detailed insights and metrics for gulp-pa11y
Gathering detailed insights and metrics for gulp-pa11y
Gathering detailed insights and metrics for gulp-pa11y
npm install gulp-pa11y
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
GPL-2.0 License
11 Stars
7 Commits
4 Forks
3 Watchers
1 Branches
2 Contributors
Updated on Sep 28, 2023
Latest Version
0.0.4
Package Id
gulp-pa11y@0.0.4
Size
11.75 kB
NPM Version
2.5.1
Node Version
0.12.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
gulp-pa11y is a gulp.js task to do accessibility audit of your site for standards: Section508, WCAG2A, WCAG2AA (default), WCAG2AAA using pa11y
It runs [HTML CodeSniffer][http://squizlabs.github.com/HTML_CodeSniffer/] from the command line for programmatic accessibility reporting.
Check out the documentation to get a full overview of what you can do and test using pally.org.
If you haven't used gulp before, be sure to check out the Getting Started guide, as it explains how to create a gulpfile.js as well as install and use gulp plugins. Once you're familiar with that process, you may install this plugin with this command:
1npm install gulp-pa11y --save-dev
Once the plugin has been installed, it may be enabled inside your gulpfile with this line of JavaScript:
1var pa11y = require('gulp-pa11y');
To start auditing pages, you must configure a start URL:
Crawl the site with deepth 1.
1{ 2 url: 'http://localhost/' 3}
With these configuration properties set, you can add sitespeedio to your default tasks list. That'll look something like this:
1gulp.task('default', ['jshint', 'pa11y']);
With this in place, gulp-pa11y will now audit the performance of your pages.
(string) The URL to sniff. Required.
(string) The reporter to use. (see custom reporters). Default console
.
(string) The standard to use. One of Section508
, WCAG2A
, WCAG2AA
, WCAG2AAA
. Default WCAG2AA
.
(boolean) Fail your build if there is any accessibility error. Default: true
(boolean) Only display the errors in report, Set to false
to display errros, warnings and notice. Default: true
(string) The URL to source HTML_CodeSniffer from. Default http://squizlabs.github.io/HTML_CodeSniffer/build/HTMLCS.js
.
(string,object) The path to a JSON config file or a config object (see configuration). Default null
.
(number) The number of milliseconds before a timeout error occurs. Default 30000
.
(string) The user-agent to send with the request. Default pa11y/<version>
.
(number) The port the PhantomJS server should run on. Default 12300
.
(number) The viewport width to load the page at.
(number) The viewport height to load the page at.
(boolean) Whether to report debug-level messages. Default: false
.
The callback function should accept two arguments. The first is an error object or null
, the second is an object containing the results of the sniff.
1 2// Sniff a URL, specifying some options 3{ 4 url: 'nature.com', 5 standard: 'WCAG2AAA', 6 timeout: 20000 7}
gulp-pa11y can be configured via a JSON file or JavaScript object.
1{ 2 config: __dirname + '/config/pa11y.json' 3}
The config file or object should be formatted like the example below, where
cookies
key is an array of maps containing only the required keys for [PhantomJS cookie objects][https://github.com/ariya/phantomjs/wiki/API-Reference#cookie-object].ignore
key holds an array of rule names you'd like to ignore. You can find the codes for each rule in the console output, so you can simply copy/paste these into your config. We also maintain a [list of all available rules][https://github.com/nature/pa11y/wiki/HTML-CodeSniffer-Rules].1{ 2 "cookies": [ 3 { 4 "name": "cookie-name", 5 "value": "cookie-value", 6 "domain": "localhost" 7 } 8 ], 9 "ignore": [ 10 "WCAG2AA.Principle2.Guideline2_4.2_4_2.H25.2", 11 "WCAG2AA.Principle3.Guideline3_1.3_1_1.H57.2" 12 ] 13}
All configuration options are optional.
gulp-pa11y can't catch all accessibility errors. It'll catch many of them, but you should do manual checking as well.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/7 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More