Skip to content

Latest commit

 

History

History
124 lines (79 loc) · 6.12 KB

README.md

File metadata and controls

124 lines (79 loc) · 6.12 KB

Salesforce Accessibility Automation Libraries

Automated Accessibility Testing Libraries and Tools (@sa11y packages) based on axe-core providing support for Jest unit tests, WebdriverIO component/integration tests used by teams in Salesforce. However, they are not specific to Salesforce and can be used to test any UI supported by axe-core for accessibility. These libraries are designed to be flexible, customizable and reusable to support automated accessibility testing in different testing workflows from unit to integration tests.

Build Status Code Coverage

Docs

References

Packages

This repo contains the following packages for automated accessibility testing:

  • Provides a toBeAccessible() accessibility matcher for Jest
  • If you are looking to add accessibility testing to your Jest tests use this package

Screenshot showing Sa11y Jest API usage and a11y errors showing up in VSCode

  • Provides assertAccessible(), assertAccessibleSync() APIs that can be used with WebdriverIO to check accessibility of web pages rendered in browsers

Screenshot showing a11y errors from a test using Sa11y WDIO in a terminal

  • Checks DOM or HTML Element for accessibility issues and throws an error if a11y issues are found
  • If you are looking to add accessibility testing to your Javascript unit tests and not using Jest, use this package
  • Formats raw JSON output of a11y issues from axe into an easy to consume format by consolidating and cross-referencing
  • Used by assert Accessible API and Jest a11y matcher
  • If you are using axe directly and want to format the results from axe.run use this package
  • Provides Base, Recommended, Full accessibility preset rules as axe configuration
  • The Recommended preset rule is used by default in the Jest a11y matcher and assert Accessible APIs
    • The APIs can be overridden to use the Base or Full ruleset as necessary
  • Provides a minified version of selected @sa11y libraries to be injected into a browser (using webdriver) and executed from integration testing workflows.

Internal packages

  • Private package providing test utilities for @sa11y packages
  • Private package providing integration tests for @sa11y packages
  • Common utilities, constants, error messages for @sa11y packages

Dependency graph

Dependency graph of sa11y packages


Epilogue

A wise person once said…

"Don't talk to me until I've had coffee and you've run axe"

Embroidery that says "Don't talk to me until I've had coffee and you've run axe" in a hoop

(Image courtesy: @shleewhite, @jorycunningham)