protractor-axs

1.0.1 • Public • Published

protractor-axs

This is essentially a fork of https://github.com/angular/protractor-accessibility-plugin that runs on each test instead of at the end of the suite.

Protractor will run each set of audits (depending on your configuration) on your existing end-to-end tests to ensure your site is free of obvious errors. In this kind of testing, there is no concept of "warnings"–only pass or fail. In your configuration, you can decide whether warnings should pass or fail your build.

Protractor now supports the Accessibility Developer Tools, the same audit library used by the Chrome browser extension. Protractor runs an audit locally by injecting the Dev Tools script into WebDriver pages, and it can diagnose issues including missing labels, incorrect ARIA attributes and color contrast.

Enable this plugin in your Protractor config file:

  exports.config = {
      ...
      plugins: [ {
        chromeA11YDevTools: {
          treatWarningsAsFailures: true,
          axsConfig: {}
        },
        path: "node_modules/protractor-axs" // this path is relative to the config file
      } ]
    }

axsConfig

An optional that object can be used to configure the validation options. See this page for options

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i protractor-axs

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • jrit