Skip to content
/ a11y Public

Automated Accessibility tests

License

Notifications You must be signed in to change notification settings

farskid/a11y

Repository files navigation

A11y

Npm Version Build Status PRs Welcome license

An experimental attempt to run accessibility insights, using different insight engines.

How to install

npm install @farskid/a11y --save-dev

or

yarn add @farskid/a11y -D

How it works

The command line runs two engines, pa11y and axe core, gathers their respenctive insights, prints the report to the stdout and stores the results in a11y-report-pa11y.json and a11y-report-axecore.json inside a directory that you can define.

Example

Running from command line:

a11y --url https://localhost:3000 --out ./reports/

API

Command line option Descriptopn Example Required Default
--url Specify the url to look into http://localhost:3000 Yes -
--out Specify the output directoty for stored reports ./reports/ No ./
--standard Specify the standard to test against (Supported Standards: WCAG2A,WCAG2AA,Section508) Section508 No WCAG2A
--fail-on-error If the process should fail and exit in case it finds any errors (it doesn't consider warnings and notices) false No false

Note: --out will create all parent directories that do not exist recursively!

Note: Standards are case sensitive!

Roadmap

  • Sync stored issue interface of engines
  • Possible integration with Cypress to inspect the issues in action
  • Visualize the stored issues in a generated HTML with reasonable styles

License

MIT

Made by Farzad YZ @farzad_yz.