Automated Accessibility Testing Libraries and Tools (@sa11y packages) based on axe-core providing support for Jest unit tests, Vitest 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.
| [Automated Accessibility Tests with sa11y | Developer Quick Takes - YouTube](https://www.youtube.com/watch?v=ScqZisOBbUM&list=PLgIMQe2PKPSJdFGHjGpjd1FbCsOqq5H8t&index=21) |
| [Automated Accessibility Testing with sa11y | Salesforce Developers Blog](https://developer.salesforce.com/blogs/2020/10/automated-accessibility-testing-with-sa11y) |
| [Get Started with Web Accessibility | Salesforce Trailhead](https://trailhead.salesforce.com/en/content/learn/trails/get-started-with-web-accessibility) |
To try changes from an open pull request before they are merged and released, e.g. to check a fix in your project, use a canary release: a test build of all public @sa11y/* packages published from the PR.
canary on the PR. Only maintainers (people with write access to this repo) can trigger a canary, so ask one to do it if you can’t. PRs from forks are not supported.canary tag. Once they can be installed, usually within about 10 minutes, a bot replies on the PR with the version, e.g. 8.2.1-canary.57.1.gd39f94e.Install that exact version in your project:
yarn add -D @sa11y/jest@8.2.1-canary.57.1.gd39f94e
# or
npm install -D @sa11y/jest@8.2.1-canary.57.1.gd39f94e
Use the same version for every @sa11y package your project depends on. The @sa11y packages they depend on are installed at that version too.
canary tag moves to the newest canary from any PR, and ranges such as ^8.2.0 never pick up a canary.No matching version found for ... with a date before ..., your npm config blocks recently published versions. See Making a canary release for how to install a canary anyway, and for how maintainers can cut a canary from a branch without a PR.This repo contains the following packages for automated accessibility testing:
toBeAccessible() accessibility matcher for Jest

toBeAccessible() accessibility matcher for VitestassertAccessible(), assertAccessibleSync() APIs that can be used with WebdriverIO to check accessibility of web pages rendered in browsers
axe.run use this packagegroupViolationResultsProcessor also made available to group the a11y violations per jest test case as the existing formatter would generate test failures for each violation@sa11y libraries to be injected into a browser (using webdriver) and executed from integration testing workflows.@sa11y packages@sa11y packages across different environments@sa11y packagesA wise person once said…
“Don’t talk to me until I’ve had coffee and you’ve run axe”

(Image courtesy: @shleewhite, @jorycunningham)