{"id":18949961,"url":"https://github.com/salesforce/sa11y","last_synced_at":"2026-01-16T22:55:35.351Z","repository":{"id":40288782,"uuid":"246829703","full_name":"salesforce/sa11y","owner":"salesforce","description":"Salesforce Automated Accessibility Testing Libraries","archived":false,"fork":false,"pushed_at":"2025-03-31T10:31:34.000Z","size":7422,"stargazers_count":95,"open_issues_count":15,"forks_count":23,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-02T21:40:55.480Z","etag":null,"topics":["accessibility","accessibility-automation","accessibility-testing","automation","axe","javascript","salesforce","test"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/org/sa11y","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salesforce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-12T12:34:10.000Z","updated_at":"2025-03-31T10:31:37.000Z","dependencies_parsed_at":"2023-09-24T16:57:14.576Z","dependency_job_id":"a00ab674-e790-4ff9-aa89-f3923876d791","html_url":"https://github.com/salesforce/sa11y","commit_stats":{"total_commits":689,"total_committers":14,"mean_commits":"49.214285714285715","dds":"0.23802612481857766","last_synced_commit":"f370b8e63f02180dac4eb4eb1a46e8a123579b88"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2Fsa11y","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2Fsa11y/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2Fsa11y/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2Fsa11y/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforce","download_url":"https://codeload.github.com/salesforce/sa11y/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838441,"owners_count":21004580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","accessibility-automation","accessibility-testing","automation","axe","javascript","salesforce","test"],"created_at":"2024-11-08T13:19:55.054Z","updated_at":"2026-01-16T22:55:35.344Z","avatar_url":"https://github.com/salesforce.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Salesforce Accessibility Automation Libraries\n\nAutomated Accessibility Testing Libraries and Tools ([@sa11y packages](https://www.npmjs.com/org/sa11y)) based on [axe-core][axe] providing support for [Jest](#jest-integration) unit tests, [Vitest](#vitest-integration) unit tests, [WebdriverIO](#wdio-integration) 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](https://github.com/dequelabs/axe-core#supported-browsers) 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.\n\n![Sa11y](https://github.com/salesforce/sa11y/workflows/CI/badge.svg)\n[![Code Coverage](https://codecov.io/gh/salesforce/sa11y/branch/master/graph/badge.svg)](https://codecov.io/gh/salesforce/sa11y)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat)](https://github.com/semantic-release/semantic-release)\n[![License](https://img.shields.io/npm/l/@sa11y/common)](./LICENSE.txt)\n[![NPM downloads per month of @sa11y/common package](https://img.shields.io/npm/dm/@sa11y/common)](https://www.npmtrends.com/@sa11y/common)\n[![Known Vulnerabilities](https://snyk.io/test/github/salesforce/sa11y/badge.svg?targetFile=package.json)](https://snyk.io/test/github/salesforce/sa11y?targetFile=package.json)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/salesforce/sa11y/badge)](https://api.securityscorecards.dev/projects/github.com/salesforce/sa11y)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Docs](#docs)\n  - [References](#references)\n- [Packages](#packages)\n  - [Jest integration](#jest-integration)\n  - [Vitest integration](#vitest-integration)\n  - [WDIO integration](#wdio-integration)\n  - [assertAccessible API](#assertaccessible-api)\n  - [a11y results formatter](#a11y-results-formatter)\n  - [Preset accessibility rules](#preset-accessibility-rules)\n  - [Core accessibility matcher](#core-accessibility-matcher)\n  - [Minified bundle for testing in browser](#minified-bundle-for-testing-in-browser)\n  - [Internal packages](#internal-packages)\n    - [Test utilities](#test-utilities)\n    - [Integration Tests](#integration-tests)\n    - [Common utilities](#common-utilities)\n  - [Epilogue](#epilogue)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Docs\n\n-   [Developer Guidelines](./CONTRIBUTING.md)\n    -   Refer to [Quick start](./CONTRIBUTING.md#quick-start) instructions to get started, if you are a developer looking to Contribute\n-   [Code of Conduct](./CODE_OF_CONDUCT.md)\n-   [Changelog](./CHANGELOG.md)\n-   [LICENSE](./LICENSE.txt)\n\n### References\n\n-   [Automated Accessibility Tests with sa11y | Developer Quick Takes - YouTube](https://www.youtube.com/watch?v=ScqZisOBbUM\u0026list=PLgIMQe2PKPSJdFGHjGpjd1FbCsOqq5H8t\u0026index=21)\n-   [Automated Accessibility Testing with sa11y | Salesforce Developers Blog](https://developer.salesforce.com/blogs/2020/10/automated-accessibility-testing-with-sa11y.html)\n-   [Get Started with Web Accessibility | Salesforce Trailhead](https://trailhead.salesforce.com/en/content/learn/trails/get-started-with-web-accessibility)\n-   [Accessibility Overview - Lightning Design System](https://www.lightningdesignsystem.com/accessibility/overview/)\n-   [LWC Accessibility guide](https://lwc.dev/guide/accessibility)\n\n## Packages\n\nThis repo contains the following packages for automated accessibility testing:\n\n### [Jest integration](./packages/jest/README.md)\n\n[![published npm version of @sa11y/jest](https://img.shields.io/npm/v/@sa11y/jest)](https://www.npmjs.com/package/@sa11y/jest)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/jest)\n\n-   Provides a `toBeAccessible()` accessibility matcher for Jest\n    -   integrates the [assertAccessible API](./packages/assert/README.md) with the [Jest assertion API](https://jestjs.io/docs/en/using-matchers)\n-   Provides an option to set up the sa11y API to be invoked automatically at the end of each test\n-   Includes custom results processors for enhanced test reporting and grouping violations by rule\n-   To add accessibility testing to your Jest tests use this package\n\n![Screenshot showing Sa11y Jest API usage and a11y errors showing up in VSCode](https://github.com/salesforce/sa11y/blob/media/screenshot/jest.png?raw=true)\n\n### [Vitest integration](./packages/vitest/README.md)\n\n[![published npm version of @sa11y/vitest](https://img.shields.io/npm/v/@sa11y/vitest)](https://www.npmjs.com/package/@sa11y/vitest)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/vitest)\n\n-   Provides a `toBeAccessible()` accessibility matcher for Vitest\n-   Integrates the core accessibility checking logic with the [Vitest testing framework](https://vitest.dev/)\n-   Supports automatic checks and custom results processing for enhanced test reporting\n-   Built on the same core logic as the Jest integration via [@sa11y/matcher](./packages/matcher/README.md)\n-   To add accessibility testing to your Vitest tests use this package\n\n### [WDIO integration](./packages/wdio/README.md)\n\n[![published npm version of @sa11y/wdio](https://img.shields.io/npm/v/@sa11y/wdio)](https://www.npmjs.com/package/@sa11y/wdio)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/wdio)\n\n-   Provides `assertAccessible()`, `assertAccessibleSync()` APIs that can be used with [WebdriverIO](https://webdriver.io/) to check accessibility of web pages rendered in browsers\n\n![Screenshot showing a11y errors from a test using Sa11y WDIO in a terminal](https://github.com/salesforce/sa11y/blob/media/screenshot/wdio.png?raw=true)\n\n### [assertAccessible API](./packages/assert/README.md)\n\n[![published npm version of @sa11y/assert](https://img.shields.io/npm/v/@sa11y/assert)](https://www.npmjs.com/package/@sa11y/assert)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/assert)\n\n-   Checks DOM or HTML Element for accessibility issues and throws an error if a11y issues are found\n-   Supports both violations and incomplete results reporting\n-   To add accessibility testing to your Javascript unit tests _not_ using Jest or Vitest, use this package\n\n### [a11y results formatter](./packages/format/README.md)\n\n[![published npm version of @sa11y/format](https://img.shields.io/npm/v/@sa11y/format)](https://www.npmjs.com/package/@sa11y/format)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/format)\n\n-   Formats raw JSON output of a11y issues from [axe] into an easy to consume format by consolidating and cross-referencing\n-   Used by assert Accessible API and Jest/Vitest a11y matchers\n-   Provides exception list filtering and WCAG metadata enhancement\n-   To use axe directly and want to format the results from `axe.run` use this package\n-   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\n\n### [Preset accessibility rules](./packages/preset-rules/README.md)\n\n[![published npm version of @sa11y/preset-rules](https://img.shields.io/npm/v/@sa11y/preset-rules)](https://www.npmjs.com/package/@sa11y/preset-rules)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/preset-rules)\n\n-   Provides Base, Extended, Full accessibility preset rules as [axe] configuration\n-   The Base preset rule is used by default in the Jest/Vitest a11y matchers and assert Accessible APIs\n    -   The APIs can be overridden to use the Extended or Full ruleset as necessary\n-   Includes custom rule support and WCAG metadata for enhanced reporting\n\n### [Core accessibility matcher](./packages/matcher/README.md)\n\n[![published npm version of @sa11y/matcher](https://img.shields.io/npm/v/@sa11y/matcher)](https://www.npmjs.com/package/@sa11y/matcher)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/matcher)\n\n-   Provides the core accessibility checking logic used by Jest and Vitest integrations\n-   Framework-agnostic programmatic APIs for accessibility testing\n-   Supports automatic checks, DOM mutation observation, and custom integrations\n-   Use this package directly for custom test runners or advanced scenarios requiring direct control\n\n### [Minified bundle for testing in browser](./packages/browser-lib/README.md)\n\n[![published npm version of @sa11y/browser-lib](https://img.shields.io/npm/v/@sa11y/browser-lib)](https://www.npmjs.com/package/@sa11y/browser-lib)\n![node-current (scoped)](https://img.shields.io/node/v/@sa11y/browser-lib)\n\n-   Provides a minified version of selected `@sa11y` libraries to be injected into a browser (using webdriver) and executed from integration testing workflows.\n-   Gives WCAG SC for rulesets in addition with [axe] tags\n-   Supports both Selenium Java and WebdriverIO integration patterns\n\n### Internal packages\n\n#### [Test utilities](./packages/test-utils/README.md)\n\n-   Private package providing test utilities, mock data, and common testing patterns for `@sa11y` packages\n-   Includes DOM fixtures with and without accessibility issues for testing\n\n#### [Integration Tests](./packages/test-integration/README.md)\n\n-   Private package providing integration tests for `@sa11y` packages across different environments\n-   Ensures cross-package compatibility and end-to-end functionality\n\n#### [Common utilities](./packages/common/README.md)\n\n-   Common utilities, constants, error messages, and helper functions for `@sa11y` packages\n-   Provides shared functionality for environment detection, custom rules, and file processing\n\n---\n\n### Epilogue\n\nA wise person once said…\n\n\u003c!-- cSpell:disable --\u003e\n\n_\"Don't talk to me until I've had coffee and you've run axe\"_\n\n![Embroidery that says \"Don't talk to me until I've had coffee and you've run axe\" in a hoop](https://github.com/salesforce/sa11y/blob/media/axe_embroidery.jpeg?raw=true)\n\n(Image courtesy: [@shleewhite](https://github.com/shleewhite), [@jorycunningham](https://github.com/jorycunningham))\n\n\u003c!-- cSpell:enable --\u003e\n\n[axe]: https://github.com/dequelabs/axe-core\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2Fsa11y","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforce%2Fsa11y","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2Fsa11y/lists"}