All Projects → ahmadnassri → node-nightwatch-accessibility

ahmadnassri / node-nightwatch-accessibility

Licence: MIT license
Nightwatch.js utility assertion for accessibility testing with aXe

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to node-nightwatch-accessibility

SunriseSunset
Java utility to calculate the time of sunrise and sunset for a given location.
Stars: ✭ 42 (+162.5%)
Mutual labels:  lib
nightwatch101
使用 Nightwatch 實現 End-to-End Testing ★
Stars: ✭ 42 (+162.5%)
Mutual labels:  nightwatch
menu-hamburger
🍔 A clean, simple and easy to use library to create a Menu Hamburger
Stars: ✭ 17 (+6.25%)
Mutual labels:  lib
ssh
golang ssh lib 远程执行命令,文件上传下载 模仿rsync和cp
Stars: ✭ 29 (+81.25%)
Mutual labels:  lib
metalsmith-paths
Metalsmith plugin that adds file path values to metadata
Stars: ✭ 19 (+18.75%)
Mutual labels:  lib
teams-api
Unofficial Microsoft Teams Library
Stars: ✭ 92 (+475%)
Mutual labels:  lib
telegram
Golang Telegram Bot API
Stars: ✭ 13 (-18.75%)
Mutual labels:  lib
html-dnd
HTML Drag and Drop Simulator for E2E testing
Stars: ✭ 53 (+231.25%)
Mutual labels:  nightwatch
babelfish
🐡 Straightforward library for translations and dictionaries
Stars: ✭ 47 (+193.75%)
Mutual labels:  lib
axe-playwright
♿: Custom commands for Playwright to run accessibility (a11y) checks with axe-core
Stars: ✭ 88 (+450%)
Mutual labels:  axe
metalsmith-request
Metalsmith plugin to grab content from the web and expose the results to metadata
Stars: ✭ 12 (-25%)
Mutual labels:  lib
cortexm-AES
high performance AES implementations optimized for cortex-m microcontrollers
Stars: ✭ 18 (+12.5%)
Mutual labels:  lib
jigjs
🧩 A front-end framework
Stars: ✭ 22 (+37.5%)
Mutual labels:  lib
epub-parser
A powerful yet easy-to-use epub parser
Stars: ✭ 103 (+543.75%)
Mutual labels:  lib
react-lite
A simple implementation of react
Stars: ✭ 51 (+218.75%)
Mutual labels:  lib
nightwatch-demo
Demo of using nightwatch js
Stars: ✭ 20 (+25%)
Mutual labels:  nightwatch
fs-pochta-api
Библиотека для работы с API Почты России
Stars: ✭ 15 (-6.25%)
Mutual labels:  lib
crawlkit
A crawler based on Phantom. Allows discovery of dynamic content and supports custom scrapers.
Stars: ✭ 23 (+43.75%)
Mutual labels:  axe
node-api-problem
HTTP Problem Utility
Stars: ✭ 24 (+50%)
Mutual labels:  lib
liblex
C library for Lexical Analysis
Stars: ✭ 25 (+56.25%)
Mutual labels:  lib

Nightwatch Accessibility

Nightwatch.js utility assertion for accessibility testing with aXe.

license release super linter test semantic

Install

npm install --only=production --save nightwatch-accessibility

Usage

Update your nightwatch config:

{
  custom_commands_path: ["./node_modules/nightwatch-accessibility/commands"],
  custom_assertions_path: ["./node_modules/nightwatch-accessibility/assertions"]
}

Use in your tests:

module.exports = {
  'Test': function (browser) {
    browser
      .initAccessibility()
      .assert.accessibility('#app', {
        verbose: true,
        rules: {
          'color-contrast': { enabled: false }
        }
      })
      .end()
  }
}

API

browser.initAccessibility()

Injects the aXe library into the current test page.

browser.assert.accessibility(context, options)

Analyzes the defined context against applied aXe rules

Name Type Default Description
context String 'html' aXe Context Parameter
options Object null aXe Options Parameter

In addition to the standard options:

  • options.verbose set to true will log all successful aXe tests.
  • options.timeout configures the nightwatch timeout, default value is 500 milliseconds

Author: Ahmad Nassri • Twitter: @AhmadNassri

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].