HTML Codesniffer runner for CrawlKit
This runner can be used with CrawlKit in order to audit a website with the HTML Codesniffer.
Install
npm install crawlkit-runner-htmlcs --save
Example
const CrawlKit = ;const HtmlCsRunner = ; const crawler = 'http://your/page';// You could add a finder here in order to audit a whole network of pagescrawler; crawler ;
Only testing certain standards
The HTML Codesniffer runner supports a parameter where you can limit the standards to test for.
By default all standards are tested.
Supported standards are: WCAG2A
, WCAG2AA
, WCAG2AAA
, Section508
.
Use one:
// Test only WCAG2AAcrawler;
or multiple:
// Test WCAG2AA & Section508crawler;
Excluding messages
If you are not interested in all levels of findings, you can set a level threshold:
// Only interested in warnings & errors (notices are below the threshold)crawler;
Valid thresholds are NOTICE
, WARNING
and ERROR
(use the constants in HtmlCsRunner.level
).
This project is in no way affiliated with squizlabs.