Agent skill · forcedotcom
experience-lwc-accessibility-jest-run
Use ALWAYS when running Sa11y accessibility Jest tests for an LWC — locally before pushing, producing the command(s), running one file vs a suite, selecting tests by naming convention, saving Sa11y-rendered HTML, or reproducing a Sa11y/A11yBug failure. Covers core (Bazel; `bazel test //<module>:<target>`) and standalone `npx jest` (`.accessibility.test.js`, `@sa11y/jest`). REQUIRED for a `run-plan.md`, a failing a11y test's exit code, or `SA11Y_*`/`A11yBug`/core-Bazel test paths. DO NOT TRIGGER for functional Jest tests, a11y review without running tests (use experience-accessibility-validate), or Selenium-based a11y tests.
What it needs
About 3k tokens when loaded.
What this skill does
<!-- a11y-expert-managed-skill --> Running LWC Accessibility Jest Tests Run Sa11y accessibility unit tests on Lightning Web Components in either: Core (Bazel) — when a WORKSPACE file is present. Standalone (Jest) — when there's no WORKSPACE. Selenium-level reproductions, GUS A11yBug ingestion, and other internal Salesforce-only flows are out of scope for this skill. For source-code-level WCAG review without running tests, see experience-accessibility-validate. When to Use This Skill User wants to run accessibility unit tests (Sa11y Jest) locally before pushing a fix. User has a known failing test file path (e.g. from an A11yBug's TestNamesc) and wants to target it directly. User is iterating on an accessibility fix and needs the fastest pass/fail signal. Prerequisites For Bazel Jest tests: a Salesforce core build environment (a WORKSPACE file is present). For standalone Jest tests: @sa11y/jest installed and configured. Workflow Choose the approach based on the environment. If this is not a Salesforce core build environment, do not mention the Core workflow. Core (Bazel) Use this mode when a WORKSPACE file is present. The base command is: Replace {coreRootPath} with the Core repository root, {moduleName} with the module name, and {relativePath} with the test file path without the .test.js extension. To discover targets and paths: Component tests typically live under modules/{componentDir}/{componentName}/tests/. Prefer a single-file target when the failing test path is known: Run all Sa11y Jest tests in a module when a specific test is not known: Multiple module targets can be passed to the same command. To filter tests within a module, add --testarg=--testMatch="/{modulePath}/". …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills forcedotcom/experience-lwc-accessibility-jest-run--78138f