@qavajs/steps-accessibility

0.4.1 • Public • Published

@qavajs/steps-accessibility

Steps to perform accessibility checks using axe library. Library can work on top of playwright and webdriverio drivers

Installation

npm install @qavajs/steps-accessibility

Configuration

module.exports = {
    default: {
        require: [
            'node_modules/@qavajs/steps-wdio/index.js', //corresponding driver library should be imported first
            'node_modules/@qavajs/steps-accessibility/index.js'
        ],
        // to customize axe instance define axe property which is a function that accepts AxeBuilder instance
        // more info: 
        // https://www.npmjs.com/package/@axe-core/webdriverio
        // https://www.npmjs.com/package/@axe-core/playwright
        axe: function (axe) {
            return axe.withTags('wcag2a')
        },
        format: [
            '@qavajs/html-formatter:report.html'
        ],
    }
}

Usage

Lib provides I perform accessibility check step that creates axe instance, performs checks and attach html report in base 64 format

Feature: Accessibility

  Scenario: perform accessibility check
    When I open 'https://qavajs.github.io/' url
    And I perform accessibility check

Readme

Keywords

none

Package Sidebar

Install

npm i @qavajs/steps-accessibility

Weekly Downloads

25

Version

0.4.1

License

MIT

Unpacked Size

10.2 kB

Total Files

9

Last publish

Collaborators

  • alexandr_legchilov
  • kirill_bogdanets
  • alexgalichenko