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.
- Developer Guidelines
- Refer to Quick start instructions to get started, if you are a developer looking to Contribute
- Code of Conduct
- Changelog
- LICENSE
- Automated Accessibility Tests with sa11y | Developer Quick Takes - YouTube
- Automated Accessibility Testing with sa11y | Salesforce Developers Blog
- Get Started with Web Accessibility | Salesforce Trailhead
- Accessibility Overview - Lightning Design System
- LWC Accessibility guide
This repo contains the following packages for automated accessibility testing:
- Provides a
toBeAccessible()
accessibility matcher for Jest- integrates the assertAccessible API with the Jest assertion API
- Provides an option to set up the sa11y API to be invoked automatically at the end of each test
- To add accessibility testing to your Jest tests use this package
- Provides
assertAccessible()
,assertAccessibleSync()
APIs that can be used with WebdriverIO to check accessibility of web pages rendered in browsers
- Checks DOM or HTML Element for accessibility issues and throws an error if a11y issues are found
- To add accessibility testing to your Javascript unit tests 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
- To use axe directly and want to format the results from
axe.run
use this package - A new formatter
groupViolationResultsProcessor
also made available to group the a11y violations per jest test case as the existing formatter would generate test failures for each violation
- Provides Base, Extended, Full accessibility preset rules as axe configuration
- The Base preset rule is used by default in the Jest a11y matcher and assert Accessible APIs
- The APIs can be overridden to use the Extended 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. - Gives WCAG SC for rulesets in addition with axe tags
- Private package providing test utilities for
@sa11y
packages
- Private package providing integration tests for
@sa11y
packages
- Common utilities, constants, error messages for
@sa11y
packages
A wise person once said…
"Don't talk to me until I've had coffee and you've run axe"
(Image courtesy: @shleewhite, @jorycunningham)