Uses AccessSniff and HTML Codesniffer to grade your site's accessibility using different levels of the WCAG guidelines.
Install this gulp plugin next to your project's gulpfile with: npm install gulp-wcag-accessibility --save-dev
Then add this line to your project's gulpfile.js gulpfile:
var wcagAccess = require('gulp-wcag-accessibility');
Place this in your gulp file.
gulp.task('test', function() {
return gulp.src('')
.pipe(wcagAccess({
accessibilityLevel: 'WCAG2AA',
maxBuffer: '1024*1024',
force: true,
verbose: false,
reportLevels: {
notice: false,
warning: false,
error: true
},
forceUrls: true,
urls: [
'http://www.w3schools.com/',
'http://www.tutorialspoint.com/'
]
}))
});
You can generate report in 4 formats:
- HTML
- JSON
- CSV
- TXT
Default is the HTML Report.
View AccessSniff options for all available options.
Steven John Miller http://www.stevenjohnmiller.com/ : https://github.com/yargalot/grunt-accessibility
Squizlabs : https://github.com/squizlabs/HTML_CodeSniffer