0.0.21 • Published 7 months ago

@userway/a11y-playwright-core v0.0.21

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

UserWay App Playwright Core

Test accessibility with @userway/a11y-static-analysis in [Playwright](https://playwright.dev/)

Development

  1. Run build with watcher:
npm run build:watch
  1. Run playwright test:
npm run test

Options

reportPath

Specify custom path from project root where to store accessibility reports and artifacts. Example: artifacts-custom

screenshots

Whether screenshots of violated elements should be saved. Default is false.

printViolationsTable

Whether to print violations table in terminal. Default is false.

strict

Whether to fail test on accessibility violations. Default is false.

failIncomplete

Whether to include incomplete rules check to violations output. Default is false.

failInapplicable

Whether to include inapplicable rules check to violations output. Default is false.

preset

One of the following present values: "A", "AA", "AAA" that specifies the WCAG rules level to check for. Default is "AA".

includeRules

List of rules to include. Accepts an array of rule IDs. Default is [].

excludeRules

List of rules to exclude. Accepts an array of rule IDs. Default is [].

includeBestPractices

Specify whether to include best practices rules. Default is false.

includeExperimental

Specify whether to include experimental rules. Default is false.

Standard Output

When accessibility violations are detected, you will printed output in terminal. analyze() returns all details included failed and passed checks.