accessibility-scanner
v0.0.1
Published
scan html for accessibility issues
Downloads
2
Readme
README
accessibility-scanner is a project that aims to add a11y issue detection capabilities to a project by scanning provided html. This library is meant to be added on PROJECT RUNNING ON A WEB BROWSER.
With npm installed, run :
$ npm install accessibility-scanner
Usage
Import the Scanner class
import { Scanner } from 'accessibility-scanner'
Use the Scanner to read HTML text and check for accessibility issues
const scanner = Scanner.fromHtmlText('<html><h1>I am a little tea pot</h1></html>')
const report = scanner.runScan();
The report will be in the following format
[{"section":"headings","key":"heading_order_incorrect","success_criterion":"2.4.10","issues":[]}]
each items in the issues array is an HtmlElement type object
License
Accessibility scanner an is open-sourced software licensed under the MIT license.