Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

ci: discover PR browser accessibility specs, so a new spec needs no workflow edit (#8367)

Cindy Zhang174300fcb68d
diff --git a/.github/a11y-audit-axe.json b/.github/a11y-audit-axe.json
new file mode 100644
index 0000000000..c57ee00464
--- /dev/null
+++ b/.github/a11y-audit-axe.json
@@ -0,0 +1,25 @@
+{
+ "$comment": "How a \"[Component Audit] <Name>:\" pull request's own axe pass deviates from the default, which audits the component's stories with `--components <Name>`, writes pr-a11y-evidence/<kebab>-a11y-report.json, and requires a non-empty <kebab>-audit-evidence/ folder (top level or under test-results/) when the audit runs a spec. Read by .github/scripts/a11y-pr-contracts.mjs. Add an entry only when an audit needs a different component set, an open-state story or readiness selector, an environment variable, or a different evidence folder.",
+ "CheckboxList": {
+ "components": ["CheckboxList", "CheckboxListItem"],
+ "report": "checkbox-list"
+ },
+ "CheckboxListItem": {
+ "components": ["CheckboxList", "CheckboxListItem"],
+ "report": "checkbox-list"
+ },
+ "ChatMessageList": {"evidence": null},
+ "ChatMessageMetadata": {"evidence": null},
+ "ChatTokenizedText": {
+ "env": {"ASTRYX_AUDIT_BASELINE_HEAD": "a7c6c7ecdf6b422df331124e8f6fc6d33cf1bd63"}
+ },
+ "ContextMenuItem": {"readySelector": "[role=\"menu\"]", "evidence": null},
+ "DateInput": {
+ "stories": ["core-dateinput--open-calendar-audit"],
+ "readySelector": "[role=\"dialog\"]"
+ },
+ "DropdownMenuDivider": {"readySelector": "[role=\"menu\"]"},
+ "DropdownMenuGroup": {"readySelector": "[role=\"menu\"]"},
+ "DropdownMenuItem": {"readySelector": "[role=\"menu\"]"},
+ "DropdownMenuSubMenu": {"evidence": "dropdown-menu-submenu-audit-evidence"}
+}
diff --git a/.github/scripts/a11y-pr-contracts.mjs b/.github/scripts/a11y-pr-contracts.mjs
new file mode 100644
index 0000000000..e167518035
--- /dev/null
+++ b/.github/scripts/a11y-pr-contracts.mjs
@@ -0,0 +1,527 @@
+#!/usr/bin/env node
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file Which browser accessibility specs a pull request runs, then run them.
+ * @input The browser specs `playwright.config.ts` matches (`playwright test
+ * --list`), each spec's own `@pr-a11y` routing lines, the files the PR changes
+ * since its merge base, the PR's component scope (`a11y-pr-scope.mjs
+ * analysis.json`), and the PR title.
+ * @output One `playwright test` run over the selected files; on a
+ * "[Component Audit] <Name>:" PR, that component's own axe pass first
+ * (`.github/a11y-audit-axe.json` holds the audits that need an open state, a
+ * different component set, or a different receipt folder); the selection,
+ * the JSON report, and the axe report in `pr-a11y-evidence/`.
+ * @position `pnpm test:a11y-contract:pr`, run by the `pr-a11y` job in ci.yml.
+ * Adding a browser spec needs no workflow change: the spec is discovered by
+ * its file name, and its own routing lines decide when a PR runs it. The
+ * release check runs every spec in `a11y-contracts` instead.
+ *
+ * Routing lines sit in the spec's header comment, one per line:
+ *
+ * @pr-a11y always every PR accessibility run, and release-check
+ * @pr-a11y scope <token> ... also run when one token matches (see below)
+ * @pr-a11y audit <Name>, ... only on a "[Component Audit] <Name>:" PR
+ * @pr-a11y release-only never on a PR; the release check runs it
+ *
+ * A spec with no `always`, `audit`, or `release-only` line is scoped: a PR runs
+ * it when it changes the spec, the spec's component folder, or a component the
+ * spec is named after, or matches one of its `scope` tokens. A token starting
+ * with `^` is a regular expression over changed paths; any other token is a
+ * package-qualified component (`core/Selector`, `richtext/*`) matched against
+ * the PR's component scope.
+ *
+ * Unknown scope (no merge base, no changed-file list) runs every scoped spec,
+ * never fewer. Locally, `pnpm test:a11y-contract:pr origin/main --dry-run`
+ * prints what a PR from this branch would run.
+ *
+ * The CI step loads this file from the merge commit its steps come from
+ * (`WORKFLOW_SHA`), and reads each spec's routing lines from that commit too,
+ * so an older PR head is routed by current policy. It uses only Node
+ * built-ins, since such a head may not have it.
+ */
+
+import {execFileSync, spawnSync} from 'node:child_process';
+import fs from 'node:fs';
+import path from 'node:path';
+import {fileURLToPath} from 'node:url';
+
+export const EVIDENCE_DIR = 'pr-a11y-evidence';
+
+const MODES = new Set(['always', 'audit', 'release-only', 'scoped']);
+
+/**
+ * Reads a spec's `@pr-a11y` routing lines.
+ * @param {string} source
+ * @returns {{mode: string, scope: string[], audits: string[]}}
+ */
+export function parseRouting(source) {
+ const routing = {mode: 'scoped', scope: [], audits: []};
+ const modes = new Set();
+ for (const line of source.split('\n')) {
+ const match =
+ /^\s*(?:\/\/|\/?\*+)\s*@pr-a11y\s+([a-z-]+)\s*(.*?)\s*(?:\*\/)?\s*$/.exec(
+ line,
+ );
+ if (!match) continue;
+ const [, key, value] = match;
+ if (key === 'scope') {
+ const tokens = value.split(/\s+/).filter(Boolean);
+ if (tokens.length === 0) throw new Error('@pr-a11y scope needs a token');
+ for (const token of tokens) {
+ if (token.startsWith('^')) new RegExp(token);
+ else if (!/^[a-z][a-z0-9-]*\/(\*|[A-Z][A-Za-z0-9]*)$/.test(token)) {
+ throw new Error(`@pr-a11y scope token is not a component: ${token}`);
+ }
+ }
+ routing.scope.push(...tokens);
+ } else if (key === 'audit') {
+ const names = value.split(/[\s,]+/).filter(Boolean);
+ if (names.length === 0 || names.some(n => !/^[A-Z]\w*$/.test(n))) {
+ throw new Error(`@pr-a11y audit needs component names: ${value}`);
+ }
+ routing.audits.push(...names);
+ modes.add('audit');
+ } else if (key === 'always' || key === 'release-only') {
+ if (value) throw new Error(`@pr-a11y ${key} takes no value`);
+ modes.add(key);
+ } else {
+ throw new Error(`Unknown @pr-a11y routing line: ${key}`);
+ }
+ }
+ if (modes.size > 1) {
+ throw new Error(`Conflicting @pr-a11y modes: ${[...modes].join(', ')}`);
+ }
+ if (modes.size === 1) routing.mode = [...modes][0];
+ if (!MODES.has(routing.mode)) throw new Error(routing.mode);
+ return routing;
+}
+
+/**
+ * The folder and component names a spec belongs to by its location.
+ * `packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts`
+ * belongs to `packages/core/src/Chat/` and to `core/Chat` and
+ * `core/ChatSendButton`.
+ * @param {string} file repository-relative path
+ */
+export function specOwners(file) {
+ const base = path.posix.basename(file);
+ const named = base.split('.')[0].replace(/Audit$/, '');
+ const pkg = /^packages\/([^/]+)\/src\/([^/]+)\//.exec(file);
+ if (pkg) {
+ const [, packageName, top] = pkg;
+ const folder = /^[A-Z]/.test(top)
+ ? `packages/${packageName}/src/${top}/`
+ : null;
+ const components = new Set();
+ if (folder) components.add(`${packageName}/${top}`);
+ if (/^[A-Z]/.test(named)) components.add(`${packageName}/${named}`);
+ return {prefixes: folder ? [folder] : [], components: [...components]};
+ }
+ // A pattern's files share its stem: `menu.ts`, `menu.fixtures.ts`, but not
+ // `menu-button.ts`.
+ return {
+ prefixes: [`${path.posix.dirname(file)}/${named}.`],
+ components: [],
+ };
+}
+
+function componentMatches(token, components) {
+ if (token.endsWith('/*')) {
+ const prefix = token.slice(0, -1);
+ return components.some(component => component.startsWith(prefix));
+ }
+ return components.includes(token);
+}
+
+/**
+ * Audited component names from a "[Component Audit] <Name>: ..." title.
+ * @param {string} title
+ */
+export function auditedComponents(title) {
+ const match = /^\[Component Audit\] ([A-Z]\w*):/.exec(title ?? '');
+ return match ? [match[1]] : [];
+}
+
+/** `DropdownMenuItem` -> `dropdown-menu-item`. */
+export function kebab(name) {
+ return name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
+}
+
+/**
+ * The audited component's own axe pass and evidence, from the default and
+ * its entry in `.github/a11y-audit-axe.json`, if any.
+ * @param {string} name
+ * @param {Record<string, object>} config
+ */
+export function auditPlan(name, config) {
+ const entry = (name !== '$comment' && config[name]) || {};
+ const known = new Set([
+ 'components',
+ 'stories',
+ 'readySelector',
+ 'env',
+ 'report',
+ 'evidence',
+ ]);
+ for (const key of Object.keys(entry)) {
+ if (!known.has(key)) throw new Error(`a11y-audit-axe.json ${name}: ${key}`);
+ }
+ const report = entry.report ?? kebab(name);
+ return {
+ components: entry.components ?? [name],
+ stories: entry.stories ?? [],
+ readySelector: entry.readySelector ?? null,
+ env: entry.env ?? {},
+ reportFile: `${EVIDENCE_DIR}/${report}-a11y-report.json`,
+ evidence:
+ entry.evidence === undefined
+ ? `${report}-audit-evidence`
+ : entry.evidence,
+ };
+}
+
+/**
+ * The audit plan for a "[Component Audit] <Name>:" title, or null when no
+ * spec names the audit and the config has no entry for it: such a name may
+ * have no owned Storybook route, and axe must not be handed it.
+ * @param {string | undefined} name
+ * @param {{routing: {audits: string[]}}[]} specs
+ * @param {Record<string, object>} config
+ */
+export function planFor(name, specs, config) {
+ if (!name) return null;
+ const configured =
+ Object.hasOwn(config, name) ||
+ specs.some(({routing}) => routing.audits.includes(name));
+ return configured ? auditPlan(name, config) : null;
+}
+
+/** The `accessibility-audit.js` arguments for an audit plan. */
+export function auditArgs(plan) {
+ return [
+ '.github/scripts/accessibility-audit.js',
+ '--storybook-dir',
+ 'apps/storybook/dist',
+ '--output',
+ plan.reportFile,
+ '--components',
+ plan.components.join(','),
+ ...(plan.stories.length ? ['--stories', plan.stories.join(',')] : []),
+ ...(plan.readySelector ? ['--ready-selector', plan.readySelector] : []),
+ '--baseline',
+ '.github/a11y-baseline.json',
+ '--fail-on-new',
+ ];
+}
+
+/**
+ * Decides which specs run and why.
+ * @param {object} options
+ * @param {{file: string, routing: ReturnType<typeof parseRouting>}[]} options.specs
+ * @param {boolean} options.isPullRequest
+ * @param {string[] | null} options.changedPaths null when unknown
+ * @param {string[]} options.components the PR's package-qualified components
+ * @param {string} options.title the PR title
+ * @returns {{file: string, reason: string}[]}
+ */
+export function selectSpecs({
+ specs,
+ isPullRequest,
+ changedPaths,
+ components,
+ title,
+}) {
+ const audited = auditedComponents(title);
+ const selected = [];
+ for (const {file, routing} of specs) {
+ const reason = (() => {
+ if (routing.mode === 'always') return 'always';
+ if (!isPullRequest || routing.mode === 'release-only') return null;
+ if (routing.mode === 'audit') {
+ const name = routing.audits.find(n => audited.includes(n));
+ return name ? `component audit ${name}` : null;
+ }
+ if (changedPaths == null) return 'scope unknown';
+ if (changedPaths.includes(file)) return 'spec changed';
+ const owners = specOwners(file);
+ for (const prefix of owners.prefixes) {
+ const hit = changedPaths.find(p => p.startsWith(prefix));
+ if (hit) return `changed ${hit}`;
+ }
+ for (const component of owners.components) {
+ if (components.includes(component)) return `component ${component}`;
+ }
+ for (const token of routing.scope) {
+ if (token.startsWith('^')) {
+ const pattern = new RegExp(token);
+ const hit = changedPaths.find(p => pattern.test(p));
+ if (hit) return `changed ${hit}`;
+ } else if (componentMatches(token, components)) {
+ return `component ${token}`;
+ }
+ }
+ return null;
+ })();
+ if (reason) selected.push({file, reason});
+ }
+ return selected;
+}
+
+/** @param {{suites?: object[]}} listing Playwright JSON reporter output (`--list`). */
+export function listedFiles(listing) {
+ const files = new Set();
+ const visit = suite => {
+ for (const spec of suite.specs ?? []) files.add(spec.file ?? suite.file);
+ for (const child of suite.suites ?? []) visit(child);
+ };
+ for (const suite of listing.suites ?? []) visit(suite);
+ return [...files].filter(Boolean).sort();
+}
+
+function git(args) {
+ return execFileSync('git', args, {
+ encoding: 'utf8',
+ stdio: ['ignore', 'pipe', 'pipe'],
+ }).trim();
+}
+
+/**
+ * Files the PR changes since its merge base with `base`, or null when that
+ * cannot be told. Deepens a shallow checkout until the merge base is found.
+ * @param {string | undefined} base
+ */
+export function changedSinceMergeBase(base) {
+ if (!base) return null;
+ try {
+ const head = git(['rev-parse', 'HEAD']);
+ const shallow = () =>
+ git(['rev-parse', '--is-shallow-repository']) === 'true';
+ const has = rev => {
+ try {
+ git(['rev-parse', '--verify', '--quiet', `${rev}^{commit}`]);
+ return true;
+ } catch {
+ return false;
+ }
+ };
+ // Only CI's shallow checkout is fetched at a depth; a complete clone is
+ // never made shallow. It fetches the base only when it lacks it.
+ const fetch = extra =>
+ git(['fetch', '--quiet', '--no-tags', ...extra, 'origin', base, head]);
+ if (shallow()) fetch(['--depth=200']);
+ else if (!has(base)) git(['fetch', '--quiet', '--no-tags', 'origin', base]);
+ let mergeBase = null;
+ for (;;) {
+ try {
+ mergeBase = git(['merge-base', base, head]);
+ break;
+ } catch {
+ if (!shallow()) return null;
+ fetch(['--deepen=200']);
+ }
+ }
+ // --no-renames lists both sides of a move.
+ return git(['diff', '--no-renames', '--name-only', mergeBase, head])
+ .split('\n')
+ .filter(Boolean);
+ } catch {
+ return null;
+ }
+}
+
+/**
+ * A spec's routing lines (and the audit config) come from the commit the
+ * workflow steps come from when it has the file (an older PR head predates
+ * current routing); otherwise from the checkout.
+ */
+function readPolicySource(root, file, policySha) {
+ if (policySha) {
+ try {
+ return execFileSync('git', ['show', `${policySha}:${file}`], {
+ cwd: root,
+ encoding: 'utf8',
+ stdio: ['ignore', 'pipe', 'ignore'],
+ });
+ } catch {
+ // Not in that commit: the PR adds it.
+ }
+ }
+ return fs.readFileSync(path.join(root, file), 'utf8');
+}
+
+function readAuditConfig(root, file, policySha) {
+ let source;
+ try {
+ source = readPolicySource(root, file, policySha);
+ } catch {
+ return {};
+ }
+ return JSON.parse(source);
+}
+
+function readComponents(root) {
+ const analysis = path.join(root, 'analysis.json');
+ if (!fs.existsSync(analysis)) {
+ console.log(
+ 'No analysis.json: component scope is not evaluated, so specs selected only by a component token are left out. CI downloads it.',
+ );
+ return [];
+ }
+ const out = execFileSync(
+ process.execPath,
+ [path.join(root, '.github/scripts/a11y-pr-scope.mjs'), analysis],
+ {cwd: root, encoding: 'utf8'},
+ ).trim();
+ return out ? out.split(',') : [];
+}
+
+function listSpecs(root) {
+ const output = execFileSync(
+ 'pnpm',
+ [
+ 'exec',
+ 'playwright',
+ 'test',
+ '--list',
+ '--reporter=json',
+ '--config',
+ 'playwright.config.ts',
+ '--project',
+ 'chromium',
+ ],
+ {cwd: root, encoding: 'utf8', maxBuffer: 256 * 1024 * 1024},
+ );
+ const listing = JSON.parse(output.slice(output.indexOf('{')));
+ const testDir = listing.config?.rootDir ?? root;
+ return listedFiles(listing).map(file =>
+ path.relative(root, path.resolve(testDir, file)).split(path.sep).join('/'),
+ );
+}
+
+function main() {
+ const root = process.cwd();
+ const isPullRequest = process.env.GITHUB_EVENT_NAME
+ ? process.env.GITHUB_EVENT_NAME === 'pull_request'
+ : true;
+ // Outside CI, a run with no base compares with origin/main.
+ const base =
+ process.env.BASE_SHA ||
+ process.argv.slice(2).find(arg => !arg.startsWith('-')) ||
+ (process.env.GITHUB_ACTIONS ? undefined : 'origin/main');
+ const policySha = process.env.WORKFLOW_SHA;
+ const specs = listSpecs(root).map(file => ({
+ file,
+ routing: parseRouting(readPolicySource(root, file, policySha)),
+ }));
+ const changedPaths = isPullRequest ? changedSinceMergeBase(base) : [];
+ const components = isPullRequest ? readComponents(root) : [];
+ const title = isPullRequest ? (process.env.PR_TITLE ?? '') : '';
+ const selected = selectSpecs({
+ specs,
+ isPullRequest,
+ changedPaths,
+ components,
+ title,
+ });
+ const [audited] = auditedComponents(title);
+ const auditConfigFile = '.github/a11y-audit-axe.json';
+ const plan = planFor(
+ audited,
+ specs,
+ readAuditConfig(root, auditConfigFile, policySha),
+ );
+ if (audited && !plan) {
+ console.log(
+ `No audit spec or ${auditConfigFile} entry names ${audited}; its own axe pass does not run (the scoped axe audit still covers changed components).`,
+ );
+ }
+
+ fs.mkdirSync(EVIDENCE_DIR, {recursive: true});
+ fs.writeFileSync(
+ path.join(EVIDENCE_DIR, 'selection.json'),
+ `${JSON.stringify(
+ {
+ head: process.env.ASTRYX_HEAD_SHA ?? null,
+ discovered: specs.length,
+ scopeKnown: changedPaths != null,
+ components,
+ audit: plan && {component: audited, ...plan},
+ selected,
+ },
+ null,
+ 2,
+ )}\n`,
+ );
+ console.log(
+ `PR accessibility specs: ${selected.length} of ${specs.length} discovered.`,
+ );
+ for (const {file, reason} of selected) console.log(` ${file} (${reason})`);
+ if (process.argv.includes('--dry-run')) return 0;
+
+ let status = 0;
+ // A component audit's own axe pass, held until its open state is ready.
+ if (plan) {
+ const axe = spawnSync(process.execPath, auditArgs(plan), {
+ cwd: root,
+ stdio: 'inherit',
+ });
+ if (axe.status !== 0) status = 1;
+ }
+ if (selected.length === 0) return status;
+
+ // One run: Playwright keeps going past a failing file, and its own output
+ // directory leaves the specs' evidence under test-results/ untouched. The
+ // filters come before --project, which takes every value after it.
+ const result = spawnSync(
+ 'pnpm',
+ [
+ 'exec',
+ 'playwright',
+ 'test',
+ ...selected.map(({file}) => file),
+ '--config',
+ 'playwright.config.ts',
+ '--reporter',
+ // In CI, keep the config's `github` reporter so a failing spec still
+ // annotates the pull request.
+ process.env.GITHUB_ACTIONS ? 'list,json,github' : 'list,json',
+ '--output',
+ 'pr-a11y-output',
+ '--project',
+ 'chromium',
+ ],
+ {
+ cwd: root,
+ stdio: 'inherit',
+ env: {
+ ...process.env,
+ ...(plan?.env ?? {}),
+ PLAYWRIGHT_JSON_OUTPUT_FILE: path.join(EVIDENCE_DIR, 'report.json'),
+ },
+ },
+ );
+ if (result.status !== 0) status = 1;
+
+ // An audit that ran its specs must leave their receipts.
+ const ranAuditSpec = selected.some(({reason}) =>
+ reason.startsWith('component audit'),
+ );
+ if (plan?.evidence && ranAuditSpec) {
+ const found = [plan.evidence, `test-results/${plan.evidence}`].some(dir => {
+ const full = path.join(root, dir);
+ return fs.existsSync(full) && fs.readdirSync(full).length > 0;
+ });
+ if (!found) {
+ console.error(
+ `::error::The ${audited} audit wrote no receipts to ${plan.evidence}/ or test-results/${plan.evidence}/.`,
+ );
+ status = 1;
+ }
+ }
+ return status;
+}
+
+if (process.argv[1] === fileURLToPath(import.meta.url)) {
+ process.exitCode = main();
+}
diff --git a/.github/scripts/a11y-pr-contracts.test.mjs b/.github/scripts/a11y-pr-contracts.test.mjs
new file mode 100644
index 0000000000..913db4e148
--- /dev/null
+++ b/.github/scripts/a11y-pr-contracts.test.mjs
@@ -0,0 +1,453 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file Routing contract for the PR browser accessibility spec runner.
+ */
+
+import {execFileSync} from 'node:child_process';
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+
+import {describe, expect, it} from 'vitest';
+
+import {
+ auditArgs,
+ auditedComponents,
+ auditPlan,
+ changedSinceMergeBase,
+ kebab,
+ planFor,
+ parseRouting,
+ selectSpecs,
+ specOwners,
+} from './a11y-pr-contracts.mjs';
+
+const root = path.resolve(import.meta.dirname, '../..');
+
+const spec = (file, lines = []) => ({
+ file,
+ routing: parseRouting(['// Copyright', ...lines, ''].join('\n')),
+});
+
+const pr = (specs, overrides = {}) =>
+ selectSpecs({
+ specs,
+ isPullRequest: true,
+ changedPaths: [],
+ components: [],
+ title: '',
+ ...overrides,
+ }).map(({file}) => file);
+
+const BINDING =
+ 'packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts';
+
+describe('parseRouting', () => {
+ it('defaults to scoped with no tokens', () => {
+ expect(parseRouting('// Copyright\nimport x;\n')).toEqual({
+ mode: 'scoped',
+ scope: [],
+ audits: [],
+ });
+ });
+
+ it('reads line and block comment forms', () => {
+ expect(parseRouting('// @pr-a11y always\n').mode).toBe('always');
+ expect(parseRouting(' * @pr-a11y release-only\n').mode).toBe(
+ 'release-only',
+ );
+ expect(
+ parseRouting('// @pr-a11y audit CheckboxList, CheckboxListItem\n'),
+ ).toEqual({
+ mode: 'audit',
+ scope: [],
+ audits: ['CheckboxList', 'CheckboxListItem'],
+ });
+ expect(
+ parseRouting('// @pr-a11y scope core/Selector richtext/* ^apps/x\n')
+ .scope,
+ ).toEqual(['core/Selector', 'richtext/*', '^apps/x']);
+ });
+
+ it.each([
+ ['an unknown key', '// @pr-a11y sometimes'],
+ ['two modes', '// @pr-a11y always\n// @pr-a11y release-only'],
+ ['an empty scope', '// @pr-a11y scope'],
+ ['a bare word scope token', '// @pr-a11y scope Selector'],
+ ['an invalid regular expression', '// @pr-a11y scope ^(oops'],
+ ['an audit without names', '// @pr-a11y audit'],
+ ['a value on always', '// @pr-a11y always yes'],
+ ])('rejects %s', (_, source) => {
+ expect(() => parseRouting(source)).toThrow();
+ });
+});
+
+describe('specOwners', () => {
+ it('owns a binding by its folder and its own name', () => {
+ expect(specOwners(BINDING)).toEqual({
+ prefixes: ['packages/core/src/Chat/'],
+ components: ['core/Chat', 'core/ChatSendButton'],
+ });
+ });
+
+ it('strips an Audit suffix from the named component', () => {
+ expect(
+ specOwners(
+ 'packages/core/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts',
+ ).components,
+ ).toContain('core/DrawerHeader');
+ });
+
+ it('gives a package-level spec no folder', () => {
+ expect(
+ specOwners('packages/core/src/__tests__/CardPress.a11y.chromium.spec.ts'),
+ ).toEqual({prefixes: [], components: ['core/CardPress']});
+ });
+
+ it('owns an a11y-spec pattern by its own stem', () => {
+ expect(
+ specOwners(
+ 'internal/a11y-spec/src/patterns/toggle-button.chromium.spec.ts',
+ ).prefixes,
+ ).toEqual(['internal/a11y-spec/src/patterns/toggle-button.']);
+ });
+
+ it("does not let one pattern's stem claim another's files", () => {
+ const menu = spec('internal/a11y-spec/src/patterns/menu.chromium.spec.ts');
+ expect(
+ pr([menu], {
+ changedPaths: ['internal/a11y-spec/src/patterns/menu-button.ts'],
+ }),
+ ).toEqual([]);
+ expect(
+ pr([menu], {
+ changedPaths: ['internal/a11y-spec/src/patterns/menu.fixtures.ts'],
+ }),
+ ).toEqual([menu.file]);
+ });
+});
+
+describe('selectSpecs', () => {
+ const always = spec('packages/core/src/__tests__/A.a11y.chromium.spec.ts', [
+ '// @pr-a11y always',
+ ]);
+ const scoped = spec(BINDING);
+ const audit = spec(
+ 'packages/core/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts',
+ ['// @pr-a11y audit ChatMessageList'],
+ );
+ const releaseOnly = spec(
+ 'packages/core/src/Chat/__tests__/ChatLayout.a11y.chromium.spec.ts',
+ ['// @pr-a11y release-only'],
+ );
+ const tokens = spec(
+ 'internal/a11y-spec/src/patterns/combobox.chromium.spec.ts',
+ [
+ '// @pr-a11y scope core/Selector richtext/* ^apps/storybook/stories/Combo',
+ ],
+ );
+ const all = [always, scoped, audit, releaseOnly, tokens];
+
+ it('runs only always-on specs when nothing is in scope', () => {
+ expect(pr(all)).toEqual([always.file]);
+ });
+
+ it('runs only always-on specs outside a pull request', () => {
+ expect(
+ pr(all, {
+ isPullRequest: false,
+ changedPaths: null,
+ title: '[Component Audit] ChatMessageList: x',
+ }),
+ ).toEqual([always.file]);
+ });
+
+ it('runs a scoped spec when its folder changes', () => {
+ expect(
+ pr(all, {changedPaths: ['packages/core/src/Chat/ChatLayout.tsx']}),
+ ).toEqual([always.file, scoped.file]);
+ });
+
+ it('does not run a scoped spec for a sibling folder sharing its prefix', () => {
+ expect(
+ pr(all, {changedPaths: ['packages/core/src/ChatFoo/x.tsx']}),
+ ).toEqual([always.file]);
+ });
+
+ it('runs a scoped spec when it changes itself', () => {
+ expect(pr([scoped], {changedPaths: [scoped.file]})).toEqual([scoped.file]);
+ });
+
+ it('runs a scoped spec for its named component in scope', () => {
+ expect(pr([scoped], {components: ['core/ChatSendButton']})).toEqual([
+ scoped.file,
+ ]);
+ expect(pr([scoped], {components: ['core/ChatSendButtons']})).toEqual([]);
+ });
+
+ it('honours component, wildcard, and path scope tokens', () => {
+ expect(pr([tokens], {components: ['core/Selector']})).toEqual([
+ tokens.file,
+ ]);
+ expect(pr([tokens], {components: ['richtext/RichTextEditor']})).toEqual([
+ tokens.file,
+ ]);
+ expect(
+ pr([tokens], {changedPaths: ['apps/storybook/stories/ComboboxA11y.tsx']}),
+ ).toEqual([tokens.file]);
+ expect(pr([tokens], {components: ['core/MultiSelector']})).toEqual([]);
+ expect(
+ pr([tokens], {changedPaths: ['x/apps/storybook/stories/Combo.tsx']}),
+ ).toEqual([]);
+ });
+
+ it('runs every scoped spec when the changed files are unknown', () => {
+ expect(pr(all, {changedPaths: null})).toEqual([
+ always.file,
+ scoped.file,
+ tokens.file,
+ ]);
+ });
+
+ it('runs an audit spec only for its audit title', () => {
+ expect(
+ pr([audit], {
+ changedPaths: [audit.file],
+ components: ['core/ChatMessageList'],
+ }),
+ ).toEqual([]);
+ expect(
+ pr([audit], {title: '[Component Audit] ChatMessageList: fix'}),
+ ).toEqual([audit.file]);
+ expect(
+ pr([audit], {title: '[Component Audit] ChatMessageLists: fix'}),
+ ).toEqual([]);
+ expect(
+ pr([audit], {title: 'fix: [Component Audit] ChatMessageList:'}),
+ ).toEqual([]);
+ });
+
+ it('never runs a release-only spec on a pull request', () => {
+ expect(
+ pr([releaseOnly], {
+ changedPaths: null,
+ components: ['core/ChatLayout'],
+ }),
+ ).toEqual([]);
+ });
+
+ it('names the reason for every selection', () => {
+ const [selected] = selectSpecs({
+ specs: [scoped],
+ isPullRequest: true,
+ changedPaths: ['packages/core/src/Chat/Chat.tsx'],
+ components: [],
+ title: '',
+ });
+ expect(selected.reason).toBe('changed packages/core/src/Chat/Chat.tsx');
+ });
+});
+
+describe('auditedComponents', () => {
+ it('reads the audited component from a component-audit title', () => {
+ expect(
+ auditedComponents('[Component Audit] DateInput: busy fields'),
+ ).toEqual(['DateInput']);
+ expect(auditedComponents('fix(DateInput): busy')).toEqual([]);
+ });
+});
+
+describe('component audit axe pass', () => {
+ const config = JSON.parse(
+ fs.readFileSync(path.join(root, '.github/a11y-audit-axe.json'), 'utf8'),
+ );
+
+ it('kebab-cases component names', () => {
+ expect(kebab('DropdownMenuRadioGroup')).toBe('dropdown-menu-radio-group');
+ expect(kebab('Drawer')).toBe('drawer');
+ });
+
+ it('audits the named component by default and requires its receipts', () => {
+ const plan = auditPlan('CommandPaletteFooter', {});
+ expect(plan).toEqual({
+ components: ['CommandPaletteFooter'],
+ stories: [],
+ readySelector: null,
+ env: {},
+ reportFile: 'pr-a11y-evidence/command-palette-footer-a11y-report.json',
+ evidence: 'command-palette-footer-audit-evidence',
+ });
+ expect(auditArgs(plan)).toEqual([
+ '.github/scripts/accessibility-audit.js',
+ '--storybook-dir',
+ 'apps/storybook/dist',
+ '--output',
+ 'pr-a11y-evidence/command-palette-footer-a11y-report.json',
+ '--components',
+ 'CommandPaletteFooter',
+ '--baseline',
+ '.github/a11y-baseline.json',
+ '--fail-on-new',
+ ]);
+ });
+
+ // The open dialog or menu is the state these audits grade; without the
+ // readiness wait, axe would scan the trigger's first frame.
+ it.each([
+ ['DateInput', '[role="dialog"]', ['core-dateinput--open-calendar-audit']],
+ ['ContextMenuItem', '[role="menu"]', []],
+ ['DropdownMenuGroup', '[role="menu"]', []],
+ ['DropdownMenuDivider', '[role="menu"]', []],
+ ['DropdownMenuItem', '[role="menu"]', []],
+ ])(
+ 'holds the %s audit until its open state is ready',
+ (name, ready, stories) => {
+ const args = auditArgs(auditPlan(name, config));
+ expect(args[args.indexOf('--ready-selector') + 1]).toBe(ready);
+ if (stories.length) {
+ expect(args[args.indexOf('--stories') + 1]).toBe(stories.join(','));
+ }
+ },
+ );
+
+ it('keeps the audits that differ from the default', () => {
+ expect(auditPlan('CheckboxListItem', config).components).toEqual([
+ 'CheckboxList',
+ 'CheckboxListItem',
+ ]);
+ expect(auditPlan('ChatTokenizedText', config).env).toEqual({
+ ASTRYX_AUDIT_BASELINE_HEAD: 'a7c6c7ecdf6b422df331124e8f6fc6d33cf1bd63',
+ });
+ expect(auditPlan('DropdownMenuSubMenu', config).evidence).toBe(
+ 'dropdown-menu-submenu-audit-evidence',
+ );
+ expect(auditPlan('ContextMenuItem', config).evidence).toBeNull();
+ });
+
+ it('plans an axe pass only for a configured or spec-named audit', () => {
+ const named = [
+ spec(
+ 'packages/core/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts',
+ ['// @pr-a11y audit Drawer'],
+ ),
+ ];
+ expect(planFor('Drawer', named, {})?.components).toEqual(['Drawer']);
+ expect(planFor('ContextMenuItem', [], config)?.readySelector).toBe(
+ '[role="menu"]',
+ );
+ // A name with no audit spec and no entry may have no owned Storybook
+ // route; axe would refuse it and fail the job.
+ expect(planFor('DialogHeader', named, config)).toBeNull();
+ expect(planFor(undefined, named, config)).toBeNull();
+ });
+
+ it('rejects an unknown key', () => {
+ expect(() => auditPlan('X', {X: {readyselector: 'a'}})).toThrow();
+ });
+
+ it('names only components that have an audit route', () => {
+ for (const name of Object.keys(config).filter(key => key !== '$comment')) {
+ expect(() => auditPlan(name, config), name).not.toThrow();
+ expect(name).toMatch(/^[A-Z]\w*$/);
+ }
+ });
+});
+
+describe('changedSinceMergeBase', () => {
+ const git = (cwd, ...args) =>
+ execFileSync('git', args, {cwd, encoding: 'utf8', stdio: 'pipe'}).trim();
+ const commit = (cwd, file, text) => {
+ fs.writeFileSync(path.join(cwd, file), text);
+ git(cwd, 'add', file);
+ git(
+ cwd,
+ '-c',
+ 'user.email=a@b',
+ '-c',
+ 'user.name=a',
+ 'commit',
+ '-qm',
+ text,
+ );
+ };
+
+ it("lists the branch's own changes and never makes a full clone shallow", () => {
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-pr-a11y-'));
+ const cwd = process.cwd();
+ try {
+ const origin = path.join(dir, 'origin');
+ fs.mkdirSync(origin);
+ git(origin, 'init', '-q', '-b', 'main');
+ for (const n of ['1', '2', '3']) commit(origin, 'base.txt', n);
+ const clone = path.join(dir, 'clone');
+ git(dir, 'clone', '-q', origin, clone);
+ git(clone, 'checkout', '-qb', 'feature');
+ commit(clone, 'feature.txt', 'f');
+ git(clone, 'push', '-q', 'origin', 'feature');
+ commit(origin, 'later.txt', 'l');
+ process.chdir(clone);
+ expect(changedSinceMergeBase('main')).toEqual(['feature.txt']);
+ expect(changedSinceMergeBase('origin/main')).toEqual(['feature.txt']);
+ expect(git(clone, 'rev-parse', '--is-shallow-repository')).toBe('false');
+ expect(changedSinceMergeBase('no-such-ref')).toBeNull();
+ expect(changedSinceMergeBase(undefined)).toBeNull();
+ } finally {
+ process.chdir(cwd);
+ fs.rmSync(dir, {recursive: true, force: true});
+ }
+ });
+});
+
+describe('repository specs', () => {
+ // Every file the playwright.config.ts globs match, found by walking the
+ // same roots (git pathspec `**` misses files directly under src/).
+ const walk = dir =>
+ fs
+ .readdirSync(path.join(root, dir), {withFileTypes: true})
+ .flatMap(entry => {
+ const relative = `${dir}/${entry.name}`;
+ if (entry.isDirectory()) {
+ return ['node_modules', 'dist'].includes(entry.name)
+ ? []
+ : walk(relative);
+ }
+ return [relative];
+ });
+ const packageRoots = fs
+ .readdirSync(path.join(root, 'packages'))
+ .map(name => `packages/${name}/src`)
+ .filter(dir => fs.existsSync(path.join(root, dir)));
+ const files = [
+ ...walk('internal/a11y-spec/src').filter(f =>
+ f.endsWith('.chromium.spec.ts'),
+ ),
+ ...packageRoots
+ .flatMap(walk)
+ .filter(f => /\.a11y\.(chromium|browser)\.spec\.ts$/.test(f)),
+ ];
+
+ it('matches the globs playwright.config.ts collects', () => {
+ const config = fs.readFileSync(
+ path.join(root, 'playwright.config.ts'),
+ 'utf8',
+ );
+ for (const glob of [
+ 'internal/a11y-spec/src/**/*.chromium.spec.ts',
+ 'packages/*/src/**/*.a11y.chromium.spec.ts',
+ 'packages/*/src/**/*.a11y.browser.spec.ts',
+ ]) {
+ expect(config).toContain(`'${glob}'`);
+ }
+ expect(files.length).toBeGreaterThan(100);
+ });
+
+ it('gives every spec valid routing lines', () => {
+ for (const file of files) {
+ expect(
+ () => parseRouting(fs.readFileSync(path.join(root, file), 'utf8')),
+ file,
+ ).not.toThrow();
+ }
+ });
+});
diff --git a/.github/scripts/ci-test-routing.test.mjs b/.github/scripts/ci-test-routing.test.mjs
index c30ccb619c..434d406ea8 100644
--- a/.github/scripts/ci-test-routing.test.mjs
+++ b/.github/scripts/ci-test-routing.test.mjs
@@ -293,74 +293,55 @@ describe.each(Object.entries(WORKFLOWS))(
},
);
-describe('ci.yml pr-a11y steps against an older PR head', () => {
+describe('ci.yml pr-a11y browser specs', () => {
const steps = load('ci.yml').jobs['pr-a11y'].steps;
- /** The spec files each `pnpm exec playwright test` in a step names. */
- const specsOf = step =>
- (step.run ?? '')
- .replace(/\\\n/g, ' ')
- .split('\n')
- .filter(line => /pnpm exec playwright test\b/.test(line))
- .flatMap(line =>
- line
- .trim()
- .split(/\s+/)
- .filter(token => /\.spec\.(ts|tsx|js|mjs)$/.test(token)),
+ const run = steps.find(
+ step => step.name === 'Run browser accessibility specs',
+ );
+ const upload = steps.find(
+ step => step.name === 'Upload browser accessibility evidence',
+ );
+
+ // Specs are discovered, never listed: a step naming one spec file is the
+ // per-test workflow edit this lane exists to avoid.
+ it('names no spec file in any step', () => {
+ for (const step of steps) {
+ expect(step.run ?? '', step.name).not.toMatch(
+ /\.spec\.(ts|tsx|js|mjs)\b/,
);
- const playwright = steps.filter(step => specsOf(step).length > 0);
-
- // The wrapper skips spec files a PR head lacks, so a step that named a file
- // missing on main would pass silently everywhere. Main's steps must name
- // files that exist; only an older head skips anything.
- it('names only spec files that exist', () => {
- expect(playwright.length).toBeGreaterThan(0);
- for (const step of playwright) {
- for (const spec of specsOf(step)) {
- expect(
- fs.existsSync(path.join(root, spec)),
- `${step.name}: ${spec}`,
- ).toBe(true);
- }
}
});
- // A step that uploads its evidence with `if-no-files-found: error` must not
- // promise a run the wrapper then skips on an older head.
- it('promises heading-links evidence only when its spec is in the head', () => {
- const run = steps.find(
- step => step.name === 'Run heading-links module browser evidence',
- ).run;
- const spec =
- 'packages/core/src/Markdown/plugins/headingLinks.a11y.chromium.spec.ts';
- const promise = run.indexOf("echo 'should_run=true'");
- expect(promise).toBeGreaterThan(-1);
- expect(run.slice(0, promise)).toContain(`if [ -e ${spec} ]; then`);
- });
-
- it("sources the merge commit's absent-spec wrapper before every Playwright step", () => {
- const index = steps.findIndex(
- step => step.name === 'Skip contract specs the PR head predates',
- );
- expect(index).toBeGreaterThan(-1);
- const wrapper = steps[index];
- expect(wrapper.if).toBe("github.event_name == 'pull_request'");
+ it("runs the merge commit's runner against the PR head", () => {
+ expect(run.if).toBe('${{ !cancelled() }}');
// The merge commit the steps come from, not the PR's recorded base, which
- // can lag main and predate the wrapper.
- expect(wrapper.env.WORKFLOW_SHA).toBe('${{ github.sha }}');
- expect(wrapper.env.BASE_SHA).toBeUndefined();
- expect(wrapper.run).toContain(
- 'git show "$WORKFLOW_SHA:.github/scripts/skip-absent-specs.sh" > "$wrapper"',
+ // can lag main and predate the runner.
+ expect(run.env.WORKFLOW_SHA).toBe('${{ github.sha }}');
+ expect(run.env.BASE_SHA).toBe('${{ github.event.pull_request.base.sha }}');
+ expect(run.env.PR_TITLE).toBe('${{ github.event.pull_request.title }}');
+ expect(run.run).toContain(
+ 'git show "$WORKFLOW_SHA:.github/scripts/a11y-pr-contracts.mjs" > "$runner"',
);
- expect(wrapper.run).toContain('echo "BASH_ENV=$wrapper" >> "$GITHUB_ENV"');
+ expect(run.run).toContain('node "$runner"');
expect(
- fs.existsSync(path.join(root, '.github/scripts/skip-absent-specs.sh')),
- ).toBe(true);
- for (const step of playwright) {
- expect(steps.indexOf(step), step.name).toBeGreaterThan(index);
- // BASH_ENV reaches bash steps only, and only calls through the function.
- expect(step.shell ?? 'bash', step.name).toMatch(/^bash/);
- expect(step.run, step.name).not.toMatch(/\b(exec|command) pnpm\b/);
+ JSON.parse(read('package.json')).scripts['test:a11y-contract:pr'],
+ ).toBe('node .github/scripts/a11y-pr-contracts.mjs');
+ });
+
+ it('uploads every spec receipt in one head-bound artifact', () => {
+ expect(upload.if).toBe('${{ !cancelled() }}');
+ expect(upload.with.name).toBe(
+ 'pr-a11y-evidence-${{ needs.build-storybook.outputs.short_hash }}',
+ );
+ for (const dir of [
+ 'pr-a11y-evidence/',
+ 'pr-a11y-output/',
+ 'test-results/',
+ '*-audit-evidence/',
+ ]) {
+ expect(upload.with.path).toContain(dir);
}
+ expect(steps.indexOf(upload)).toBeGreaterThan(steps.indexOf(run));
});
});
diff --git a/.github/scripts/pr-scope-touches.test.mjs b/.github/scripts/pr-scope-touches.test.mjs
index 12570d2680..7a051ef232 100644
--- a/.github/scripts/pr-scope-touches.test.mjs
+++ b/.github/scripts/pr-scope-touches.test.mjs
@@ -179,9 +179,9 @@ describe('pr-scope-touches', () => {
workflow.match(
/git show "\$BASE_SHA:\.github\/scripts\/pr-scope-touches\.sh" > "\$helper"/g,
) ?? [];
- // Every consumer loads the helper from the base; new contract steps add
- // consumers, so the count is a floor, not an exact tally.
- expect(uses.length).toBeGreaterThanOrEqual(4);
+ // Every consumer loads the helper from the base; the count is a floor,
+ // not an exact tally.
+ expect(uses.length).toBeGreaterThanOrEqual(1);
expect(fromBase.length).toBe(uses.length);
expect(workflow).not.toMatch(/bash \.github\/scripts\/pr-scope-touches/);
});
diff --git a/.github/scripts/release-check-workflow.test.mjs b/.github/scripts/release-check-workflow.test.mjs
index b83b387a81..d5275c4859 100644
--- a/.github/scripts/release-check-workflow.test.mjs
+++ b/.github/scripts/release-check-workflow.test.mjs
@@ -751,15 +751,11 @@ describe('full release scope without PR metadata or maintenance writes', () => {
);
expect(step('a11y-contracts', name).with['delete-merged']).toBe(true);
}
- // An older PR head can lack a spec added on main; the exact main or
- // release head a release check runs on has every one.
- const wrapper = step('pr-a11y', 'Skip contract specs the PR head predates');
- expect(runs(wrapper, {event: 'pull_request', operation: ''})).toBe(true);
- expect(runs(wrapper)).toBe(false);
for (const name of [
'Run modal close visibility guard',
'Run theme var reachability guard',
'Run story play guard',
+ 'Run browser accessibility specs',
]) {
expect(
runs(step('pr-a11y', name), {event: 'pull_request', operation: ''}),
diff --git a/.github/scripts/skip-absent-specs.sh b/.github/scripts/skip-absent-specs.sh
deleted file mode 100755
index 1b6e709bf4..0000000000
--- a/.github/scripts/skip-absent-specs.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) Meta Platforms, Inc. and affiliates.
-#
-# Lets a pr-a11y step run against a PR head that predates its spec file.
-#
-# Not run directly: pr-a11y sources it into every later step through
-# BASH_ENV. A PR step's body comes from the merge commit, but pr-a11y checks
-# out the PR head. A contract step added on main after the PR branched names a
-# spec file that head does not have, and Playwright fails the step with "No
-# tests found".
-#
-# This wraps `pnpm exec playwright test`: spec files absent from the checkout
-# are dropped from the command with a notice, and a step left with none passes
-# without running Playwright. Every other pnpm command runs unchanged. The
-# routing tests keep main's steps pointing at spec files that exist, so only an
-# older head skips anything; rebasing it runs the new contract.
-#
-# The job loads this from the merge commit (github.sha) its steps come from,
-# since an older PR head does not have it and the PR's recorded base can lag
-# main.
-
-pnpm() {
- if [ "${1-}" = exec ] && [ "${2-}" = playwright ] && [ "${3-}" = test ]; then
- local arg
- local kept=0
- local dropped=0
- local args=()
- for arg in "${@:4}"; do
- case "$arg" in
- -*) ;;
- *.spec.ts | *.spec.tsx | *.spec.js | *.spec.mjs)
- if [ ! -e "$arg" ]; then
- echo "::notice title=Spec not in this PR head::${arg} is not in this pull request's head; rebase onto main to run it."
- dropped=$((dropped + 1))
- continue
- fi
- kept=$((kept + 1))
- ;;
- esac
- args+=("$arg")
- done
- if [ "$dropped" -gt 0 ] && [ "$kept" -eq 0 ]; then
- echo "None of this step's spec files is in the PR head; nothing to run."
- return 0
- fi
- set -- exec playwright test "${args[@]}"
- fi
- command pnpm "$@"
-}
diff --git a/.github/scripts/skip-absent-specs.test.mjs b/.github/scripts/skip-absent-specs.test.mjs
deleted file mode 100644
index f478b1bf85..0000000000
--- a/.github/scripts/skip-absent-specs.test.mjs
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
-/**
- * @file skip-absent-specs.test.mjs
- *
- * The wrapper pr-a11y sources into its steps so that a contract step added on
- * main does not fail an older PR head that lacks the step's spec file. Each
- * case runs a step script the way the job does (`bash -e`, the wrapper in
- * BASH_ENV) against a stand-in pnpm that records what it was asked to run.
- */
-
-import {spawnSync} from 'node:child_process';
-import fs from 'node:fs';
-import os from 'node:os';
-import path from 'node:path';
-
-import {afterEach, beforeEach, describe, expect, it} from 'vitest';
-
-const WRAPPER = path.join(import.meta.dirname, 'skip-absent-specs.sh');
-const PRESENT = 'specs/Present.a11y.chromium.spec.ts';
-const ABSENT = 'specs/Absent.a11y.chromium.spec.ts';
-
-describe('skip-absent-specs.sh', () => {
- let dir;
-
- beforeEach(() => {
- dir = fs.mkdtempSync(path.join(os.tmpdir(), 'astryx-skip-absent-specs-'));
- fs.mkdirSync(path.join(dir, 'bin'));
- fs.writeFileSync(
- path.join(dir, 'bin', 'pnpm'),
- '#!/usr/bin/env bash\necho "$*" >> "$PNPM_LOG"\nexit "${PNPM_EXIT:-0}"\n',
- {mode: 0o755},
- );
- fs.mkdirSync(path.join(dir, 'specs'));
- fs.writeFileSync(path.join(dir, PRESENT), '');
- });
-
- afterEach(() => {
- fs.rmSync(dir, {recursive: true, force: true});
- });
-
- function step(script, env = {}) {
- const file = path.join(dir, 'step.sh');
- const log = path.join(dir, 'pnpm.log');
- fs.writeFileSync(file, script);
- const result = spawnSync('bash', ['-e', file], {
- cwd: dir,
- encoding: 'utf8',
- env: {
- ...process.env,
- BASH_ENV: WRAPPER,
- PATH: `${path.join(dir, 'bin')}${path.delimiter}${process.env.PATH}`,
- PNPM_LOG: log,
- ...env,
- },
- });
- const calls = fs.existsSync(log)
- ? fs.readFileSync(log, 'utf8').trim().split('\n')
- : [];
- return {status: result.status, stdout: result.stdout, calls};
- }
-
- it('runs a step whose spec files are all present unchanged', () => {
- const {status, stdout, calls} = step(
- `pnpm exec playwright test \\\n ${PRESENT} \\\n --project chromium \\\n --output out\n`,
- );
- expect(status).toBe(0);
- expect(calls).toEqual([
- `exec playwright test ${PRESENT} --project chromium --output out`,
- ]);
- expect(stdout).not.toContain('::notice');
- });
-
- it('drops a spec file the head lacks, with a notice, and runs the rest', () => {
- const {status, stdout, calls} = step(
- `pnpm exec playwright test ${ABSENT} ${PRESENT} --project chromium --reporter list,json --output out\n`,
- );
- expect(status).toBe(0);
- expect(calls).toEqual([
- `exec playwright test ${PRESENT} --project chromium --reporter list,json --output out`,
- ]);
- expect(stdout).toContain(
- `::notice title=Spec not in this PR head::${ABSENT} is not in this pull request's head; rebase onto main to run it.`,
- );
- });
-
- it('passes a step whose spec files are all absent without running Playwright', () => {
- const {status, stdout, calls} = step(
- `pnpm exec playwright test ${ABSENT} --project chromium --output out\necho after\n`,
- );
- expect(status).toBe(0);
- expect(calls).toEqual([]);
- expect(stdout).toContain(
- `::notice title=Spec not in this PR head::${ABSENT}`,
- );
- expect(stdout).toContain('nothing to run');
- expect(stdout).toContain('after');
- });
-
- it('keeps a failing Playwright run failing', () => {
- const {status, calls} = step(
- `pnpm exec playwright test ${PRESENT} --project chromium\necho unreachable\n`,
- {PNPM_EXIT: '1'},
- );
- expect(status).toBe(1);
- expect(calls).toHaveLength(1);
- });
-
- it('leaves every other pnpm command alone', () => {
- const {status, calls} = step(
- 'pnpm install --frozen-lockfile\npnpm exec playwright install chromium\npnpm exec vitest run x.spec.ts\n',
- );
- expect(status).toBe(0);
- expect(calls).toEqual([
- 'install --frozen-lockfile',
- 'exec playwright install chromium',
- 'exec vitest run x.spec.ts',
- ]);
- });
-});
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ba4a8f7d05..99bf17a04e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1443,25 +1443,6 @@ jobs:
EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: test "$(git rev-parse HEAD)" = "$EXPECTED_HEAD_SHA"
- # A contract step added on main after this PR branched names a spec file
- # the PR head does not have, and would fail with "No tests found". The
- # wrapper, sourced into every later step, drops such files from
- # `pnpm exec playwright test` with a notice and passes a step left with
- # none. It comes from the merge commit these steps come from (an older PR
- # head lacks it, and the PR's recorded base can lag main).
- - name: Skip contract specs the PR head predates
- if: github.event_name == 'pull_request'
- env:
- WORKFLOW_SHA: ${{ github.sha }}
- run: |
- wrapper="$RUNNER_TEMP/skip-absent-specs.sh"
- if git fetch --quiet --no-tags --depth=1 origin "$WORKFLOW_SHA" \
- && git show "$WORKFLOW_SHA:.github/scripts/skip-absent-specs.sh" > "$wrapper"; then
- echo "BASH_ENV=$wrapper" >> "$GITHUB_ENV"
- else
- echo "::warning::Could not load the spec wrapper from the merge commit; contract steps run unwrapped."
- fi
-
# Dependencies are installed later, together with the Playwright browser,
# because the analysis artifact has to be downloaded first.
- name: Setup Node and pnpm
@@ -1545,2084 +1526,45 @@ jobs:
- name: Run story play guard
run: node .github/scripts/story-play-guard.js --storybook-dir apps/storybook/dist
- # The empty-state announcement is a live-region claim: what a screen
- # reader receives when a search dead-ends, and that the message element
- # stays presentational so `role="listbox"` keeps only option/group
- # children. jsdom proves the wiring; only a real engine shows the
- # accessibility tree that results, and this contract is cheap enough to
- # run on every PR rather than waiting for the release matrix. Its own
- # --output directory so a later audit run cannot clear it, and it cannot
- # clear theirs (Playwright wipes the default directory per run).
- - name: Run empty-state announcement contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts \
- --project chromium \
- --output empty-state-announcement-output
-
- # A disabled MultiSelector trigger keeps focus when it is disabled while
- # focused. jsdom never moves focus off a newly disabled element, so only
- # a real engine shows the loss this guards against.
- - name: Run MultiSelector disabled-focus contract
- run: |
- pnpm exec playwright test \
- packages/core/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts \
- --project chromium \
- --output multiselector-disabled-focus-output
-
- # In a right-to-left page Lightbox's Next button sits on the left, and
- # the arrow keys must move toward the button on their side. The
- # direction reaches the top-layer dialog through the engine's own
- # cascade, which jsdom does not inherit.
- - name: Run Lightbox arrow-key direction contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts \
- --project chromium \
- --output lightbox-keyboard-output
-
- # The same guard for Selector and ComplexSelector triggers.
- - name: Run disabled trigger focus contract
- run: |
- pnpm exec playwright test \
- packages/core/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts \
- --project chromium \
- --output disabled-trigger-focus-output
-
- # A pinch that starts on, or reaches, a Lab reorder grip (ListInput,
- # TransferList) must zoom the page (WCAG 1.4.4), while a one-finger drag
- # on the grip still reorders. touch-action and pinch-zoom only exist in a
- # real engine with two-finger touch input.
- - name: Run Lab reorder grip pinch-zoom contract
- run: |
- pnpm exec playwright test \
- packages/lab/src/__tests__/ReorderGripPinchZoom.a11y.chromium.spec.ts \
- --project chromium \
- --output reorder-grip-pinch-zoom-output
-
- # Table merges a consumer min-width with its column floors through CSS
- # max(). jsdom keeps any string, so only a real engine shows whether the
- # emitted declaration parses; an invalid one drops the floors entirely.
- - name: Run Table min-width contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts \
- --project chromium \
- --output table-min-width-output
-
- # A row the pointer lights in a menu (a resting mouse, a held press
- # dragged over it) takes focus without matching :focus-visible, and a key
- # pressed afterwards moves focus with it; jsdom has no focus-visible
- # heuristic, so only a real engine shows it.
- - name: Run menu hover focus contract
- run: |
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts \
- --project chromium \
- --output menu-hover-focus-output
-
- # A CodeBlock diff row's tint has to follow a long line to the end of its
- # scroll width; jsdom has no layout, so only a real engine shows whether
- # the paint stops at the viewport edge when the reader scrolls.
- - name: Run CodeBlock diff row paint contract
- run: |
- pnpm exec playwright test \
- packages/core/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts \
- --project chromium \
- --output codeblock-diff-row-paint-output
- # A CodeBlock viewport is a Tab stop only while its code overflows; jsdom
- # has no layout, so only a real engine shows the stop appear with a wide
- # or capped block and stay away from a short one.
- - name: Run CodeBlock overflow tab-stop contract
- run: |
- pnpm exec playwright test \
- packages/core/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts \
- --project chromium \
- --output codeblock-overflow-stop-output
-
- # A DropdownMenu header and footer sit beside the menu, outside its
- # role="menu" element, and join one Tab sequence with it. Focus order,
- # the popover's focus trap, the keyboard-only ring and a finger tap on a
- # footer control only exist in a real engine.
- - name: Run DropdownMenu header and footer contract
- run: |
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts \
- --project chromium \
- --output menu-header-footer-output
-
- # A card's press overlay paints a finger's press only if its arms win
- # the cascade of the layered stylesheet Storybook builds, which jsdom
- # does not model; the real engine shows the pixels under a held touch.
- - name: Run card press overlay contract
- run: |
- pnpm exec playwright test \
- packages/core/src/__tests__/CardPress.a11y.chromium.spec.ts \
- --project chromium \
- --output card-press-output
-
- # A menu inside a shadow root must act on the row under a released
- # pointer; at the document level a real engine resolves that point to
- # the shadow host, which jsdom cannot show.
- - name: Run menu press shadow-root contract
- run: |
- pnpm exec playwright test \
- packages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts \
- --project chromium \
- --output menu-press-shadow-root-output
-
- # A two-finger pinch over an open picker wheel must zoom the page (WCAG
- # 1.4.4) while one finger still scrolls the wheel. jsdom computes no
- # touch-action, so only a real engine shows which gesture the browser
- # keeps.
- - name: Run picker wheel pinch-zoom contract
- run: |
- pnpm exec playwright test \
- packages/core/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts \
- --project chromium \
- --output wheel-pinch-zoom-output
-
- # A sub-menu with a header or footer is a modal dialog beside the root's
- # menu, outside every role="menu" element. Its Tab order, a header radio
- # group the browser moves focus in after the pointer leaves, the
- # press-drag pick and the phone drill-in only exist in a real engine.
- - name: Run DropdownMenu sub-menu header and footer contract
- run: |
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts \
- --project chromium \
- --output submenu-header-footer-output
-
- # Tooltip and HoverCard answer a touch only once it is a tap: they open
- # when the finger lifts, never for a touch that turns into a scroll, and
- # a tap-opened layer closes when a tap outside lifts. Whether a touch is
- # a tap, a scroll or a long press is the engine's own gesture decision,
- # which only real touch input reaches.
- - name: Run hover layer touch contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts \
- --project chromium \
- --output hover-layer-touch-output
-
- # A pointer that crosses from a Tooltip's trigger onto the tooltip in one
- # step must not lose it (WCAG 1.4.13 hoverable). The defect is in the
- # order the engine dispatches mouseout and mouseleave on that step, which
- # only a real engine produces.
- - name: Run Tooltip hover bridge contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts \
- --project chromium \
- --output tooltip-hover-bridge-output
-
- # A Token's remove target is enlarged past its 16px X, and only a real
- # engine hit-tests it: a press on the end of the value beside the X must
- # run the token's own action, and a press just outside the X must remove.
- - name: Run Token remove target contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts \
- --project chromium \
- --output token-remove-target-output
-
- # On a phone narrower than the drawer, the drawer must still leave a
- # strip of the page to tap to close it (it is capped at 85vw). Viewport
- # units, the backdrop's hit testing and a real tap only exist in a real
- # engine.
- - name: Run MobileNav width contract
- run: |
- pnpm exec playwright test \
- packages/core/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts \
- --project chromium \
- --output mobile-nav-width-output
-
- # On a phone-width screen AppShell shows TopNav's compact bar. A long
- # heading must give way so the menu toggle stays inside the bar and the
- # drawer's close button stays inside the drawer; only a real engine lays
- # them out.
- - name: Run TopNav mobile long heading contract
- run: |
- pnpm exec playwright test \
- packages/core/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts \
- --project chromium \
- --output top-nav-mobile-long-heading-output
-
- # A pinch that starts on a row with swipe actions must zoom the page
- # (WCAG 1.4.4) and leave the row where it is, whichever finger lands
- # first, while a one-finger sideways drag still swipes. Pinch-zoom and
- # touch-action only exist in a real engine with two-finger touch input.
- - name: Run Item swipe pinch-zoom contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts \
- --project chromium \
- --output item-swipe-pinch-zoom-output
-
- # The RichTextEditor "Markdown parity" stories render one Markdown
- # document with core Markdown and RichTextEditor and measure where each
- # block lands; geometry, the read/edit switch and the scroll anchor only
- # exist in a real engine. The spec proves the sandbox still works and
- # banks screenshots plus a geometry manifest of today's differences. It
- # asserts no parity. A pull request runs it only when it can change what
- # the sandbox shows: Markdown or a RichText component is in the PR scope,
- # the RichText package changed, or the sandbox's own stories or spec
- # changed. Release-check always runs it. Its own --output directory, with
- # the upload immediately after.
- - name: Run Markdown/RichText parity sandbox evidence
- id: markdown-parity
+ # Browser accessibility specs. The runner runs every spec
+ # playwright.config.ts matches whose own `@pr-a11y` routing lines select
+ # it for this pull request (its component folder or named component is in
+ # scope, a scope token matches, a "[Component Audit] <Name>:" title names
+ # it, or it runs always), in one Playwright run with its own --output
+ # directory. A new spec needs no step here. The runner and the routing
+ # lines come from the merge commit these steps come from, so an older PR
+ # head is routed by current policy; the specs themselves run at the head.
+ # Release checks run only the always-on specs here: every spec runs in
+ # a11y-contracts.
+ - name: Run browser accessibility specs
if: ${{ !cancelled() }}
env:
ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ PR_TITLE: ${{ github.event.pull_request.title }}
+ WORKFLOW_SHA: ${{ github.sha }}
run: |
- should_run=true
- if [ "${{ github.event_name }}" = 'pull_request' ]; then
- should_run=false
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,core/Markdown,* | *,richtext/*) should_run=true ;;
- esac
- if node -e "process.exit(require('./analysis.json').changedPackages?.includes('@astryxdesign/richtext') ? 0 : 1)"; then
- should_run=true
- fi
- # The sandbox's stories belong to no package, so compare the file
- # names the PR changes since its merge base.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(apps/storybook/stories/RichTextEditor\.(markdownParity|stories)|packages/richtext/src/__tests__/(MarkdownParitySandbox|RichTextView|RichTextEditorToolbar))' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Markdown, RichText, and the parity sandbox are not in PR scope; skipping parity evidence."
- exit 0
- fi
- # The RichTextView typography and RichText toolbar layout specs share
- # this scope, so they ride the same gate and output directory.
- pnpm exec playwright test \
- packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts \
- packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts \
- packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts \
- --project chromium \
- --output richtext-markdown-parity-output
-
- - name: Upload Markdown/RichText parity sandbox evidence
- if: ${{ !cancelled() && steps.markdown-parity.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: richtext-markdown-parity-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: test-results/richtext-markdown-parity/
- retention-days: 30
- if-no-files-found: warn
-
- # Outline owns real DOM focus through roving tabindex. Computed paint,
- # pointer modality, clipping, forced colors, and exact pixels require the
- # same real Chromium artifact this blocking accessibility lane already owns.
- - name: Run Outline focus indicator contract
- if: github.event_name == 'pull_request'
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,core/Outline,*)
- pnpm exec playwright test \
- packages/core/src/Outline/OutlineFocus.a11y.chromium.spec.ts \
- --project chromium \
- --output outline-focus-output
- ;;
- *) echo "Outline not in PR scope; skipping focus evidence." ;;
- esac
+ runner="$RUNNER_TEMP/a11y-pr-contracts.mjs"
+ git fetch --quiet --no-tags --depth=1 origin "$WORKFLOW_SHA"
+ git show "$WORKFLOW_SHA:.github/scripts/a11y-pr-contracts.mjs" > "$runner"
+ node "$runner"
- - name: Upload Outline focus evidence
- if: always() && github.event_name == 'pull_request'
+ # One artifact for every spec's evidence: the selection and JSON report,
+ # Playwright's own output, and the receipts specs write under
+ # test-results/ or a top-level *-audit-evidence/ folder.
+ - name: Upload browser accessibility evidence
+ if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
- name: outline-focus-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: test-results/outline-focus-evidence/
+ name: pr-a11y-evidence-${{ needs.build-storybook.outputs.short_hash }}
+ path: |
+ pr-a11y-evidence/
+ pr-a11y-output/
+ test-results/
+ *-audit-evidence/
retention-days: 30
if-no-files-found: ignore
- # The toggle-button contract's pressed state, keyboard and pointer round
- # trips, aborted press, focus, and unavailable state are accessibility-tree
- # and engine facts that jsdom cannot observe. Run the contract's own
- # fixture proof and the ToggleButton binding whenever the PR scope names
- # ToggleButton or the contract changes. Its own --output directory; the
- # JSON report is the head-bound record, uploaded immediately after.
- - name: Run ToggleButton accessibility contract
- id: toggle-button-contract
- if: github.event_name == 'pull_request'
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: toggle-button-contract/report.json
- run: |
- should_run=false
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,core/ToggleButton,*) should_run=true ;;
- esac
- # The contract belongs to no package, so compare the file names the
- # PR changes since its merge base.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^internal/a11y-spec/src/patterns/toggle-button' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "ToggleButton and its contract are not in PR scope; skipping toggle-button evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/toggle-button.chromium.spec.ts \
- packages/core/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output toggle-button-contract-output
-
- - name: Upload ToggleButton accessibility contract evidence
- if: ${{ !cancelled() && steps.toggle-button-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: toggle-button-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: toggle-button-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The landmark contract's role, name, and repeated-label outcomes are
- # accessibility-tree facts that jsdom cannot observe. Run the contract's
- # own fixture proof and the Layout regions binding whenever Layout source,
- # the binding's stories, or the contract changes. Its own --output
- # directory; the JSON report is the head-bound record, uploaded next.
- - name: Run Landmark accessibility contract
- id: landmark-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: landmark-contract/report.json
- run: |
- should_run=false
- # Layout and the contract are matched by file name so every Layout
- # region component is covered.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/landmark|packages/core/src/Layout/|apps/storybook/stories/LayoutLandmarkA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Layout and the landmark contract are not in PR scope; skipping landmark evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/landmark.chromium.spec.ts \
- packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output landmark-contract-output
-
- - name: Upload Landmark accessibility contract evidence
- if: ${{ !cancelled() && steps.landmark-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: landmark-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: landmark-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The menu-button contract's control role and name, the focus landing on
- # Enter, Space, ArrowDown, and ArrowUp opens, and the pointer round trip
- # are accessibility-tree and real-browser facts that jsdom cannot observe.
- # Run the contract's own fixture proof and the DropdownMenu/MoreMenu
- # binding whenever either component's source, the binding's stories, or
- # the contract changes. Its own --output directory; the JSON report is
- # the head-bound record, uploaded next.
- - name: Run Menu Button accessibility contract
- id: menu-button-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: menu-button-contract/report.json
- run: |
- should_run=false
- # DropdownMenu, MoreMenu, and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/menu-button|packages/core/src/DropdownMenu/|packages/core/src/MoreMenu/|apps/storybook/stories/MenuButtonA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "DropdownMenu, MoreMenu, and the menu-button contract are not in PR scope; skipping menu-button evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/menu-button.chromium.spec.ts \
- packages/core/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output menu-button-contract-output
-
- - name: Upload Menu Button accessibility contract evidence
- if: ${{ !cancelled() && steps.menu-button-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: menu-button-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: menu-button-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The menu contract's role and name, item roles, and the arrow, Home/End,
- # typeahead, Enter, Escape and Tab transitions are accessibility-tree and
- # real-browser facts that jsdom cannot observe. Run the contract's own
- # fixture proof and the DropdownMenu pointer-menu binding whenever
- # DropdownMenu source, the binding's stories, or the contract changes.
- # Its own --output directory; the JSON report is the head-bound record,
- # uploaded next.
- - name: Run Menu accessibility contract
- id: menu-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: menu-contract/report.json
- run: |
- should_run=false
- # DropdownMenu and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/menu\.|packages/core/src/DropdownMenu/|apps/storybook/stories/MenuA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "DropdownMenu and the menu contract are not in PR scope; skipping menu evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/menu.chromium.spec.ts \
- packages/core/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output menu-contract-output
-
- - name: Upload Menu accessibility contract evidence
- if: ${{ !cancelled() && steps.menu-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: menu-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: menu-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The table contract's table role and name, header and cell roles, and
- # their place in the table's accessibility subtree are accessibility-tree
- # facts that jsdom cannot observe. Run the contract's own fixture proof and
- # the Table binding whenever Table source, the binding's stories, or the
- # contract changes. Its own --output directory; the JSON report is the
- # head-bound record, uploaded next.
- - name: Run Table accessibility contract
- id: table-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: table-contract/report.json
- run: |
- should_run=false
- # Table and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/table\.|packages/core/src/Table/|apps/storybook/stories/TableA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Table and the table contract are not in PR scope; skipping table evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/table.chromium.spec.ts \
- packages/core/src/Table/__tests__/Table.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output table-contract-output
-
- - name: Upload Table accessibility contract evidence
- if: ${{ !cancelled() && steps.table-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: table-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: table-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The toolbar contract's role and name, the controls inside it, the single
- # Tab stop, and the arrow (wrap, RTL, vertical) and Home/End movement are
- # accessibility-tree and real-browser facts that jsdom cannot observe. Run
- # the contract's own fixture proof and the Toolbar binding whenever
- # Toolbar source, the binding's stories, or the contract changes. Its own
- # --output directory; the JSON report is the head-bound record, uploaded
- # next.
- - name: Run Toolbar accessibility contract
- id: toolbar-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: toolbar-contract/report.json
- run: |
- should_run=false
- # Toolbar and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/toolbar\.|packages/core/src/Toolbar/|apps/storybook/stories/ToolbarA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Toolbar and the toolbar contract are not in PR scope; skipping toolbar evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/toolbar.chromium.spec.ts \
- packages/core/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output toolbar-contract-output
-
- - name: Upload Toolbar accessibility contract evidence
- if: ${{ !cancelled() && steps.toolbar-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: toolbar-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: toolbar-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The Chromium harness's own self-tests: what it reads from the engine's
- # accessibility tree, rendered visibility, and the pointer primitives
- # (hover, pointerAway) contracts drive. Run them whenever the harness
- # changes, so a harness change carries its own browser evidence.
- - name: Run accessibility harness self-tests
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- run: |
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" '^internal/a11y-spec/src/harness' || scope=$?
- fi
- if [ "$scope" = 1 ]; then
- echo "The accessibility harness is not in PR scope; skipping its self-tests."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/harness/chromium.chromium.spec.ts \
- --project chromium \
- --output a11y-harness-output
-
- # The tooltip contract's computed description, focus and hover showing,
- # Escape and focus-leaving dismissal, and staying while hovered are
- # accessibility-tree and real-browser facts that jsdom cannot observe. Run
- # the contract's own fixture proof and the Tooltip binding whenever
- # Tooltip source, the binding's stories, or the contract changes. Its own
- # --output directory; the JSON report is the head-bound record, uploaded
- # next.
- - name: Run Tooltip accessibility contract
- id: tooltip-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: tooltip-contract/report.json
- run: |
- should_run=false
- # Tooltip and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/tooltip\.|packages/core/src/Tooltip/|apps/storybook/stories/TooltipA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Tooltip and the tooltip contract are not in PR scope; skipping tooltip evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/tooltip.chromium.spec.ts \
- packages/core/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output tooltip-contract-output
-
- - name: Upload Tooltip accessibility contract evidence
- if: ${{ !cancelled() && steps.tooltip-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: tooltip-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: tooltip-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # Under Reduce Motion a layer that opens under a finger fades in, while
- # under a mouse it still appears at once. Reduce Motion and a coarse
- # pointer are media queries, which only a real engine resolves.
- - name: Run layer reduced-motion entrance contract
- run: |
- pnpm exec playwright test \
- packages/core/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts \
- --project chromium \
- --output layer-reduced-motion-output
-
- # The accordion contract's header role and name, the page Tab step between
- # headers, the absence of arrow-key focus movement, and the single-expansion
- # sibling collapse are accessibility-tree and real-browser facts that jsdom
- # cannot observe. Run the contract's own fixture proof and the
- # CollapsibleGroup binding whenever Collapsible source, the binding's
- # stories, or the contract changes. Its own --output directory; the JSON
- # report is the head-bound record, uploaded next.
- - name: Run Accordion accessibility contract
- id: accordion-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: accordion-contract/report.json
- run: |
- should_run=false
- # Collapsible and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/accordion|packages/core/src/Collapsible/|apps/storybook/stories/CollapsibleGroupA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "CollapsibleGroup and the accordion contract are not in PR scope; skipping accordion evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/accordion.chromium.spec.ts \
- packages/core/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output accordion-contract-output
-
- - name: Upload Accordion accessibility contract evidence
- if: ${{ !cancelled() && steps.accordion-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: accordion-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: accordion-contract/
-
- # The slider contract's thumb role and name, and its arrow, Page, Home and
- # End results, are accessibility-tree and real-browser facts that jsdom
- # cannot observe. Run the contract's own fixture proof and the Slider
- # binding whenever Slider, the harness, the binding's stories, or the
- # contract changes. Its own --output directory; the JSON report is the
- # head-bound record, uploaded next.
- - name: Run Slider accessibility contract
- id: slider-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: slider-contract/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/slider|internal/a11y-spec/src/harness|packages/core/src/Slider/|apps/storybook/stories/SliderA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Slider and the slider contract are not in PR scope; skipping slider evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/slider.chromium.spec.ts \
- packages/core/src/Slider/__tests__/Slider.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output slider-contract-output
-
- - name: Upload Slider accessibility contract evidence
- if: ${{ !cancelled() && steps.slider-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: slider-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: slider-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The progressbar contract's role and name, value and range, indeterminate
- # state, and value text are accessibility-tree facts that jsdom cannot
- # observe. Run the contract's own fixture proof and the ProgressBar and
- # CircularProgress bindings whenever either component, the binding
- # stories, or the contract changes. Its own --output directory; the JSON
- # report is the head-bound record, uploaded next.
- - name: Run Progressbar accessibility contract
- id: progressbar-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: progressbar-contract/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/progressbar\.|packages/core/src/ProgressBar/|packages/lab/src/CircularProgress/|apps/storybook/stories/ProgressbarA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "ProgressBar, CircularProgress and the progressbar contract are not in PR scope; skipping progressbar evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/progressbar.chromium.spec.ts \
- packages/core/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts \
- packages/lab/src/CircularProgress/__tests__/CircularProgress.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output progressbar-contract-output
-
- - name: Upload Progressbar accessibility contract evidence
- if: ${{ !cancelled() && steps.progressbar-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: progressbar-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: progressbar-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # A treeitem's computed name and description are accessibility-tree facts
- # jsdom approximates but a browser decides. Run the TreeList row-naming
- # evidence whenever TreeList, its focus hook, or the story changes.
- - name: Run TreeList row-naming evidence
- id: treelist-row-names
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: treelist-row-names/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(packages/core/src/TreeList/|packages/core/src/hooks/useTreeFocus|apps/storybook/stories/TreeListA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "TreeList is not in PR scope; skipping row-naming evidence."
- exit 0
- fi
- pnpm exec playwright test \
- packages/core/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output treelist-row-names-output
-
- - name: Upload TreeList row-naming evidence
- if: ${{ !cancelled() && steps.treelist-row-names.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: treelist-row-names-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: treelist-row-names/
- retention-days: 30
- if-no-files-found: warn
-
- # The tree-view contract's roles and names, one Tab stop, arrow/Home/End,
- # Enter and typeahead movement are accessibility-tree and real-browser
- # facts that jsdom cannot observe. Run the contract's own fixture proof
- # and the TreeList binding whenever TreeList, its focus hook, the
- # binding's stories, or the contract changes. Its own --output directory;
- # the JSON report is the head-bound record, uploaded next.
- - name: Run Tree View accessibility contract
- id: tree-view-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: tree-view-contract/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/tree-view|internal/a11y-spec/src/harness|packages/core/src/TreeList/|packages/core/src/hooks/useTreeFocus|apps/storybook/stories/TreeListTreeViewA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "TreeList and the tree-view contract are not in PR scope; skipping tree-view evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/tree-view.chromium.spec.ts \
- packages/core/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output tree-view-contract-output
-
- - name: Upload Tree View accessibility contract evidence
- if: ${{ !cancelled() && steps.tree-view-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: tree-view-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: tree-view-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The carousel contract's collection and slide names, off-screen slide
- # exposure, scroll-area keyboard entry and exit, and control focus are
- # accessibility-tree and engine facts that jsdom cannot observe. Run the
- # contract's own fixture proof and the Carousel binding whenever Carousel
- # source, the binding's stories, or the contract changes. Its own --output
- # directory; the JSON report is the head-bound record, uploaded next.
- - name: Run Carousel accessibility contract
- id: carousel-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: carousel-contract/report.json
- run: |
- should_run=false
- # Carousel and the contract are matched by file name.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/carousel|packages/core/src/Carousel/|apps/storybook/stories/CarouselA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Carousel and the carousel contract are not in PR scope; skipping carousel evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/carousel.chromium.spec.ts \
- packages/core/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output carousel-contract-output
-
- - name: Upload Carousel accessibility contract evidence
- if: ${{ !cancelled() && steps.carousel-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: carousel-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: carousel-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The alert-dialog contract's role, name, modality, initial focus, Escape
- # and click-beside outcomes are accessibility-tree and real-browser facts
- # that jsdom cannot observe. Run the contract's own fixture proof and the
- # AlertDialog binding whenever AlertDialog, Dialog, the harness, the
- # binding's stories, or the contract changes. Its own --output
- # directory; the JSON report is the head-bound record, uploaded next.
- - name: Run Alert Dialog accessibility contract
- id: alert-dialog-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: alert-dialog-contract/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/alert-dialog|internal/a11y-spec/src/harness|packages/core/src/AlertDialog/|packages/core/src/Dialog/|apps/storybook/stories/AlertDialogA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "AlertDialog and the alert-dialog contract are not in PR scope; skipping alert-dialog evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/alert-dialog.chromium.spec.ts \
- packages/core/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output alert-dialog-contract-output
-
- - name: Upload Alert Dialog accessibility contract evidence
- if: ${{ !cancelled() && steps.alert-dialog-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: alert-dialog-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: alert-dialog-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The grid contract's role and name, and its arrow, Home, End and Enter
- # results, are accessibility-tree and real-browser facts that jsdom cannot
- # observe. Run the contract's own fixture proof and the Calendar binding
- # whenever Calendar, the grid-focus hook, the harness, the binding's
- # stories, or the contract changes. Its own --output directory; the JSON
- # report is the head-bound record, uploaded next.
- - name: Run Grid accessibility contract
- id: grid-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: grid-contract/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/grid|internal/a11y-spec/src/harness|packages/core/src/Calendar/|packages/core/src/hooks/useGridFocus|apps/storybook/stories/CalendarGridA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Calendar and the grid contract are not in PR scope; skipping grid evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/grid.chromium.spec.ts \
- packages/core/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output grid-contract-output
-
- - name: Upload Grid accessibility contract evidence
- if: ${{ !cancelled() && steps.grid-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: grid-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: grid-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The window-splitter contract's separator role and name, its pane
- # relationship, and its arrow, Enter, Home and End results are
- # accessibility-tree and real-browser facts that jsdom cannot observe.
- # Run the contract's own fixture proof and the ResizeHandle binding
- # whenever Resizable, the harness, the binding's stories, or the contract
- # changes. Its own --output directory; the JSON report is the
- # head-bound record, uploaded next.
- - name: Run Window Splitter accessibility contract
- id: window-splitter-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: window-splitter-contract/report.json
- run: |
- should_run=false
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/window-splitter|internal/a11y-spec/src/harness|packages/core/src/Resizable/|apps/storybook/stories/WindowSplitterA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Resizable and the window-splitter contract are not in PR scope; skipping window-splitter evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/window-splitter.chromium.spec.ts \
- packages/core/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output window-splitter-contract-output
-
- - name: Upload Window Splitter accessibility contract evidence
- if: ${{ !cancelled() && steps.window-splitter-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: window-splitter-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: window-splitter-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The link contract's role, name, Tab, Enter, and pointer-release outcomes
- # are accessibility-tree and real-browser facts that jsdom cannot observe.
- # Run the contract's own fixture proof and the Link binding whenever Link
- # source, the binding's stories, or the contract changes. Its own --output
- # directory; the JSON report is the head-bound record, uploaded next.
- - name: Run Link accessibility contract
- id: link-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: link-contract/report.json
- run: |
- should_run=false
- # Link and the contract are matched by file name so every Link source
- # file, including LinkProvider, is covered.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/link\.|packages/core/src/Link/|apps/storybook/stories/LinkA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Link and the link contract are not in PR scope; skipping link evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/link.chromium.spec.ts \
- packages/core/src/Link/__tests__/Link.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output link-contract-output
-
- - name: Upload Link accessibility contract evidence
- if: ${{ !cancelled() && steps.link-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: link-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: link-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The combobox contract's accessible name and its popup and
- # active-descendant relationships are accessibility-tree facts that jsdom
- # cannot observe. Run the contract's own fixture proof and the Selector
- # binding whenever the PR scope names Selector, or the contract or its
- # audit story changes. Its own --output directory; the JSON report is the
- # head-bound record, uploaded next.
- - name: Run Combobox accessibility contract
- id: combobox-contract
- if: ${{ !cancelled() && github.event_name == 'pull_request' }}
- env:
- BASE_SHA: ${{ github.event.pull_request.base.sha }}
- PLAYWRIGHT_JSON_OUTPUT_FILE: combobox-contract/report.json
- run: |
- should_run=false
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,core/Selector,*) should_run=true ;;
- esac
- # The contract belongs to no package, so compare the file names the
- # PR changes since its merge base.
- # The helper comes from the base, since an older PR head lacks it.
- # Exit 1 means out of scope; 0 in scope; 2 unknown, so run.
- scope=2
- helper="$(mktemp)"
- if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \
- && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then
- scope=0
- bash "$helper" "$BASE_SHA" \
- '^(internal/a11y-spec/src/patterns/combobox|apps/storybook/stories/ComboboxA11y)' || scope=$?
- fi
- if [ "$scope" != 1 ]; then
- should_run=true
- fi
- echo "should_run=${should_run}" >> "$GITHUB_OUTPUT"
- if [ "$should_run" != true ]; then
- echo "Selector and the combobox contract are not in PR scope; skipping combobox evidence."
- exit 0
- fi
- pnpm exec playwright test \
- internal/a11y-spec/src/patterns/combobox.chromium.spec.ts \
- packages/core/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts \
- --project chromium \
- --reporter list,json \
- --output combobox-contract-output
-
- - name: Upload Combobox accessibility contract evidence
- if: ${{ !cancelled() && steps.combobox-contract.outputs.should_run == 'true' }}
- uses: actions/upload-artifact@v7
- with:
- name: combobox-contract-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: combobox-contract/
- retention-days: 30
- if-no-files-found: warn
-
- # The Schedule time grid owns scroll geometry — pinned header and gutter
- # alignment under classic scrollbars, inline scroll ownership, keyboard
- # reach and its focus ring — none of which exists in jsdom. Every
- # contract file under the Schedule tests directory runs here, in the
- # same real Chromium artifact, whenever the PR scope names Schedule.
- - name: Run Schedule time-grid contract
- if: github.event_name == 'pull_request'
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,lab/Schedule,*)
- pnpm exec playwright test \
- packages/lab/src/Schedule/__tests__/ \
- --project chromium \
- --output schedule-time-grid-output
- ;;
- *) echo "Schedule not in PR scope; skipping time-grid evidence." ;;
- esac
-
- - name: Upload Schedule time-grid evidence
- if: always() && github.event_name == 'pull_request'
- uses: actions/upload-artifact@v7
- with:
- name: schedule-time-grid-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: test-results/schedule-time-grid-evidence/
- retention-days: 30
- if-no-files-found: ignore
-
- # The heading-links module contract is broader than axe: exact fragments,
- # native sibling anchors, hover/focus/touch discovery, forced colors,
- # reduced motion, dark mode, and RTL geometry all need a real engine.
- # Keep it scoped to Markdown plugin changes and bind its receipt to the verified head.
- - name: Run heading-links module browser evidence
- id: markdown-heading-links
- if: github.event_name == 'pull_request'
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,core/Markdown,*)
- # An older PR head can lack the spec (the wrapper then skips
- # it), and it would leave nothing for the upload to find.
- if [ -e packages/core/src/Markdown/plugins/headingLinks.a11y.chromium.spec.ts ]; then
- echo 'should_run=true' >> "$GITHUB_OUTPUT"
- else
- echo 'should_run=false' >> "$GITHUB_OUTPUT"
- fi
- pnpm exec playwright test \
- packages/core/src/Markdown/plugins/headingLinks.a11y.chromium.spec.ts \
- --project chromium \
- --output markdown-heading-links-output
- ;;
- *)
- echo 'should_run=false' >> "$GITHUB_OUTPUT"
- echo "Markdown not in PR scope; skipping heading-link evidence."
- ;;
- esac
-
- - name: Upload heading-links module browser evidence
- if: always() && github.event_name == 'pull_request' && steps.markdown-heading-links.outputs.should_run == 'true'
- uses: actions/upload-artifact@v7
- with:
- name: markdown-heading-links-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: test-results/markdown-heading-links/
- retention-days: 30
- if-no-files-found: error
-
- # ChatMessageBubble is nested under the shared Chat source directory, so
- # the generic stable-visual owner cannot select its dedicated fixture.
- # Run the component's bounded evidence matrix only when the PR scope names
- # it, and upload the receipted frames below.
- - name: Run ChatMessageBubble audit browser evidence
- if: github.event_name == 'pull_request'
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- COMPONENTS=$(node .github/scripts/a11y-pr-scope.mjs analysis.json)
- case ",${COMPONENTS}," in
- *,core/ChatMessageBubble,*)
- pnpm exec playwright test \
- packages/core/src/Chat/__tests__/ChatMessageBubble.a11y.chromium.spec.ts \
- --project chromium
- ;;
- *) echo "ChatMessageBubble not in PR scope; skipping audit evidence." ;;
- esac
-
- - name: Upload ChatMessageBubble audit evidence
- if: always() && github.event_name == 'pull_request'
- uses: actions/upload-artifact@v7
- with:
- name: chat-message-bubble-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: test-results/chat-message-bubble-audit-evidence/
- retention-days: 30
- if-no-files-found: ignore
-
- # A component audit needs evidence for each state it scores. The generic
- # visual manifest does not include semantic-state or geometry sensors, so
- # this existing Chromium owner captures bounded, fail-closed receipts.
- - name: Run ChatMessageList audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatMessageList:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output chat-message-list-a11y-report.json \
- --components ChatMessageList \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload ChatMessageList audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatMessageList:')
- uses: actions/upload-artifact@v7
- with:
- name: chat-message-list-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- chat-message-list-a11y-report.json
- test-results/chat-message-list-audit-evidence/
- retention-days: 30
- if-no-files-found: ignore
-
- # CommandPaletteFooter's default and replacement branches live inside the
- # parent dialog. Its owned stories keep those branches routable so exact-
- # head Chromium can measure semantics, theme reach, RTL order, and reflow.
- - name: Run CommandPaletteFooter audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPaletteFooter:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output command-palette-footer-a11y-report.json \
- --components CommandPaletteFooter \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload CommandPaletteFooter audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPaletteFooter:')
- uses: actions/upload-artifact@v7
- with:
- name: command-palette-footer-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- command-palette-footer-a11y-report.json
- test-results/command-palette-footer-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # CollapsibleGroup's shared Collapsible story previously left the audit
- # owner with no routable browser fixture. Its dedicated matrix now emits
- # semantic-state, geometry, direction, theme, and viewport receipts.
- - name: Run CollapsibleGroup audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CollapsibleGroup:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output collapsible-group-a11y-report.json \
- --components CollapsibleGroup \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload CollapsibleGroup audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CollapsibleGroup:')
- uses: actions/upload-artifact@v7
- with:
- name: collapsible-group-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- collapsible-group-a11y-report.json
- test-results/collapsible-group-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # CommandPalette's interactive stories previously rendered only closed
- # triggers. Its owned matrix keeps grouped, empty, and pending anatomy
- # reachable for semantic, contrast, direction, and viewport receipts.
- - name: Run CommandPalette audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPalette:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output command-palette-a11y-report.json \
- --components CommandPalette \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload CommandPalette audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPalette:')
- uses: actions/upload-artifact@v7
- with:
- name: command-palette-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- command-palette-a11y-report.json
- test-results/command-palette-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # CommandPaletteInput owns a standalone searchbox and contextual combobox.
- # Its audit lane keeps the visible keyboard-focus, theme, direction,
- # responsive, empty, and pending receipts bound to the exact PR head.
- - name: Run CommandPaletteInput audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPaletteInput:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output command-palette-input-a11y-report.json \
- --components CommandPaletteInput \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload CommandPaletteInput audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPaletteInput:')
- uses: actions/upload-artifact@v7
- with:
- name: command-palette-input-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- command-palette-input-a11y-report.json
- command-palette-input-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # CommandPaletteItem owns the option semantics and visible result states.
- # Its audit lane keeps state, theme, direction, and narrow receipts bound
- # to the exact PR head without changing the component's public contract.
- - name: Run CommandPaletteItem audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPaletteItem:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output command-palette-item-a11y-report.json \
- --components CommandPaletteItem \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload CommandPaletteItem audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] CommandPaletteItem:')
- uses: actions/upload-artifact@v7
- with:
- name: command-palette-item-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- command-palette-item-a11y-report.json
- command-palette-item-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # FieldLabel owns native and group labelling, hidden text, optionality,
- # descriptions, and delegated icon/tooltip presentation. Its audit lane
- # keeps those states bound to exact-head themes, direction, and viewport.
- - name: Run FieldLabel audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] FieldLabel:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output field-label-a11y-report.json \
- --components FieldLabel \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload FieldLabel audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] FieldLabel:')
- uses: actions/upload-artifact@v7
- with:
- name: field-label-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- field-label-a11y-report.json
- field-label-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # Component-owned metadata fixtures retain exact-head browser receipts on
- # audit PRs, including failed pre-fix cases for before/after comparison.
- - name: Run ChatMessageMetadata audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatMessageMetadata:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output chat-message-metadata-a11y-report.json \
- --components ChatMessageMetadata \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload ChatMessageMetadata audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatMessageMetadata:')
- uses: actions/upload-artifact@v7
- with:
- name: chat-message-metadata-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- chat-message-metadata-a11y-report.json
- test-results/chat-message-metadata-audit-evidence/
- retention-days: 30
- if-no-files-found: ignore
-
- # ChatSendButton's component audit grades real interaction paint, disabled
- # stability, both sizes, and narrow coarse-pointer geometry. Keep those
- # receipts exact-head and bounded to its audit PR title.
- - name: Run ChatSendButton audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatSendButton:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output chat-send-button-a11y-report.json \
- --components ChatSendButton \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload ChatSendButton audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatSendButton:')
- uses: actions/upload-artifact@v7
- with:
- name: chat-send-button-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- chat-send-button-a11y-report.json
- test-results/chat-send-button-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # ChatSystemMessage is noninteractive, but its status/separator semantics,
- # delegated paint, contrast, and narrow reflow still require exact-head
- # browser receipts rather than source-only claims.
- - name: Run ChatSystemMessage audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatSystemMessage:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output chat-system-message-a11y-report.json \
- --components ChatSystemMessage \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload ChatSystemMessage audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatSystemMessage:')
- uses: actions/upload-artifact@v7
- with:
- name: chat-system-message-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- chat-system-message-a11y-report.json
- test-results/chat-system-message-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # ChatTokenizedText is noninteractive, but its literal matching, delegated
- # token paint, light/dark rendering, and narrow reflow require exact-head
- # browser receipts for the state matrix graded by its component audit.
- - name: Run ChatTokenizedText audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatTokenizedText:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- ASTRYX_AUDIT_BASELINE_HEAD: a7c6c7ecdf6b422df331124e8f6fc6d33cf1bd63
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output chat-tokenized-text-a11y-report.json \
- --components ChatTokenizedText \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
- pnpm exec playwright test \
- packages/core/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts \
- --project chromium
-
- - name: Upload ChatTokenizedText audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ChatTokenizedText:')
- uses: actions/upload-artifact@v7
- with:
- name: chat-tokenized-text-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- chat-tokenized-text-a11y-report.json
- test-results/chat-tokenized-text-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DropdownMenuGroup is a hidden compound subcomponent, so the dedicated
- # story and sensor lane keep named and unnamed group semantics, heading
- # paint, target placement, keyboard exclusion, theme, direction, and
- # narrow layout bound to the exact pull-request head.
- - name: Run DropdownMenuGroup audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuGroup:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output dropdown-menu-group-a11y-report.json \
- --components DropdownMenuGroup \
- --ready-selector '[role="menu"]' \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DropdownMenuGroup audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuGroup:')
- uses: actions/upload-artifact@v7
- with:
- name: dropdown-menu-group-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- dropdown-menu-group-a11y-report.json
- dropdown-menu-group-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DropdownMenuDivider is a hidden compound subcomponent, so the dedicated
- # story and sensor lane keep its open-menu semantics, paint, target
- # placement, keyboard exclusion, theme, direction, and narrow layout bound
- # to the exact pull-request head.
- - name: Run DropdownMenuDivider audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuDivider:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output dropdown-menu-divider-a11y-report.json \
- --components DropdownMenuDivider \
- --ready-selector '[role="menu"]' \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DropdownMenuDivider audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuDivider:')
- uses: actions/upload-artifact@v7
- with:
- name: dropdown-menu-divider-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- dropdown-menu-divider-a11y-report.json
- dropdown-menu-divider-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DropdownMenuItem owns one interactive pointer-menu row. Its label, icon,
- # description, and end content follow logical document direction; the row
- # uses logical inline padding and start-aligned text. Parent DropdownMenu
- # owns directional placement and keyboard navigation.
- - name: Run DropdownMenuItem audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuItem:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output dropdown-menu-item-a11y-report.json \
- --components DropdownMenuItem \
- --ready-selector '[role="menu"]' \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DropdownMenuItem audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuItem:')
- uses: actions/upload-artifact@v7
- with:
- name: dropdown-menu-item-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- dropdown-menu-item-a11y-report.json
- dropdown-menu-item-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DropdownMenuRadioGroup owns controlled value propagation, the named
- # role=group wrapper, close policy, and the tokenized gap between radio
- # rows. Parent DropdownMenu owns keyboard navigation; each radio item owns
- # menuitemradio semantics and indicator paint.
- - name: Run DropdownMenuRadioGroup audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuRadioGroup:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output dropdown-menu-radio-group-a11y-report.json \
- --components DropdownMenuRadioGroup \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DropdownMenuRadioGroup audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuRadioGroup:')
- uses: actions/upload-artifact@v7
- with:
- name: dropdown-menu-radio-group-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- dropdown-menu-radio-group-a11y-report.json
- dropdown-menu-radio-group-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DropdownMenuRadioItem owns one menuitemradio row: its checked state,
- # decorative radio marker, icon, description, end content, disabled
- # paint, and composition of caller handlers with row activation. The
- # group owns value propagation; DropdownMenu owns keyboard navigation.
- - name: Run DropdownMenuRadioItem audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuRadioItem:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output dropdown-menu-radio-item-a11y-report.json \
- --components DropdownMenuRadioItem \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DropdownMenuRadioItem audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuRadioItem:')
- uses: actions/upload-artifact@v7
- with:
- name: dropdown-menu-radio-item-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- dropdown-menu-radio-item-a11y-report.json
- dropdown-menu-radio-item-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DropdownMenuSubMenu owns one menuitem row that reveals its own rows: the
- # popup state and wiring, the flyout beside the row, the drilled-in view,
- # the caret or spinner, and disabled paint. DropdownMenu owns the root
- # surface, the drill-in stack, and root keyboard navigation.
- - name: Run DropdownMenuSubMenu audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuSubMenu:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output dropdown-menu-submenu-a11y-report.json \
- --components DropdownMenuSubMenu \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DropdownMenuSubMenu audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DropdownMenuSubMenu:')
- uses: actions/upload-artifact@v7
- with:
- name: dropdown-menu-submenu-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- dropdown-menu-submenu-a11y-report.json
- dropdown-menu-submenu-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # ContextMenu owns pointer and touch presentations across cursor anchoring,
- # selectable rows, sections, inline triggers, RTL, and narrow viewports.
- # Its audit lane binds the rendered matrix to the exact pull-request head.
- - name: Run ContextMenu audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ContextMenu:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output context-menu-a11y-report.json \
- --components ContextMenu \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload ContextMenu audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ContextMenu:')
- uses: actions/upload-artifact@v7
- with:
- name: context-menu-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- context-menu-a11y-report.json
- context-menu-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # ComplexSelector's whole-component audit grades the rendered state matrix,
- # caller-rendered trigger anchor/focus behavior, RTL, and 320px reflow from
- # exact-head Chromium receipts. Keep this with the existing pr-a11y owner.
- - name: Run ComplexSelector audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ComplexSelector:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output complex-selector-a11y-report.json \
- --components ComplexSelector \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload ComplexSelector audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ComplexSelector:')
- uses: actions/upload-artifact@v7
- with:
- name: complex-selector-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- complex-selector-a11y-report.json
- test-results/complex-selector-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # ContextMenuItem opens from a pointer gesture after the trigger renders.
- # The focused selector wait binds axe to the open menu rather than letting
- # the trigger's first frame satisfy generic Storybook readiness.
- - name: Run ContextMenuItem audit browser evidence
- if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ContextMenuItem:')
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output context-menu-item-a11y-report.json \
- --components ContextMenuItem \
- --ready-selector '[role="menu"]' \
- --baseline .github/a11y-baseline.json \
- --fail-on-new
-
- - name: Upload ContextMenuItem audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] ContextMenuItem:')
- uses: actions/upload-artifact@v7
- with:
- name: context-menu-item-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: context-menu-item-a11y-report.json
- retention-days: 30
- if-no-files-found: error
-
- # Drawer audit evidence covers modal/non-modal, both logical sides,
- # root-owned RTL, purpose, narrow widths, custom theming, padding, and
- # sibling stacking. Axe and the sensor matrix both run even if one fails.
- - name: Run Drawer audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] Drawer:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output drawer-a11y-report.json \
- --components Drawer \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload Drawer audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] Drawer:')
- uses: actions/upload-artifact@v7
- with:
- name: drawer-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- drawer-a11y-report.json
- test-results/drawer-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DrawerHeader audit evidence proves its title row, numeric ReactNode slot
- # values, close action, direction, theme, focus, and narrow reflow on the
- # exact PR head. Axe and the sensor matrix both run if either one fails.
- - name: Run DrawerHeader audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DrawerHeader:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output drawer-header-a11y-report.json \
- --components DrawerHeader \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DrawerHeader audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DrawerHeader:')
- uses: actions/upload-artifact@v7
- with:
- name: drawer-header-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- drawer-header-a11y-report.json
- test-results/drawer-header-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # DateInput's open-state audit story uses a play function to open the
- # popover. Restricting this focused pass to that story lets the selector
- # wait bind axe to the Calendar dialog without making every DateInput story
- # require an open overlay. The receipt spec then captures rest, focus,
- # busy, disabled, status, and open states across the popover, native, and
- # bottom-sheet surfaces, themes, direction, pointers, and viewport.
- - name: Run DateInput audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DateInput:') }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output date-input-a11y-report.json \
- --components DateInput \
- --stories core-dateinput--open-calendar-audit \
- --ready-selector '[role="dialog"]' \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload DateInput audit evidence
- if: always() && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Component Audit] DateInput:')
- uses: actions/upload-artifact@v7
- with:
- name: date-input-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- date-input-a11y-report.json
- date-input-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
- # The CheckboxList and CheckboxListItem component audits grade the same
- # option rows: interactive row paint, focus, busy, disabled, read-only,
- # status, narrow, forced-colors, and RTL states from exact-head Chromium
- # receipts. The shared checkbox contract also runs for its
- # CheckboxListItem bindings, with its own output directory so it cannot
- # clear the receipts. Each lane runs even when another fails, and the
- # step still runs after an earlier audit step fails, so a failing-before
- # head banks complete evidence.
- - name: Run CheckboxList audit browser evidence
- if: ${{ !cancelled() && github.event_name == 'pull_request' && (startsWith(github.event.pull_request.title, '[Component Audit] CheckboxList:') || startsWith(github.event.pull_request.title, '[Component Audit] CheckboxListItem:')) }}
- env:
- ASTRYX_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- PLAYWRIGHT_JSON_OUTPUT_NAME: checkbox-list-pattern-results.json
- run: |
- status=0
- node .github/scripts/accessibility-audit.js \
- --storybook-dir apps/storybook/dist \
- --output checkbox-list-a11y-report.json \
- --components CheckboxList,CheckboxListItem \
- --baseline .github/a11y-baseline.json \
- --fail-on-new || status=1
- pnpm exec playwright test \
- packages/core/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts \
- --project chromium \
- --grep 'CheckboxListItem \[' \
- --output checkbox-list-pattern-output \
- --reporter=list,json || status=1
- pnpm exec playwright test \
- packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts \
- --project chromium || status=1
- exit "$status"
-
- - name: Upload CheckboxList audit evidence
- if: always() && github.event_name == 'pull_request' && (startsWith(github.event.pull_request.title, '[Component Audit] CheckboxList:') || startsWith(github.event.pull_request.title, '[Component Audit] CheckboxListItem:'))
- uses: actions/upload-artifact@v7
- with:
- name: checkbox-list-audit-evidence-${{ needs.build-storybook.outputs.short_hash }}
- path: |
- checkbox-list-a11y-report.json
- checkbox-list-pattern-results.json
- test-results/checkbox-list-audit-evidence/
- retention-days: 30
- if-no-files-found: error
-
# Release-only accessibility contracts run beside pr-a11y instead of after
# its full axe sweep, so the release check waits for the longer of the two
# rather than their sum. release-check requires this job as it requires
diff --git a/.gitignore b/.gitignore
index 7a200d4462..fd8765ec49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -97,3 +97,7 @@ packages/core/src/i18n/generated-locales/
# when the manifest's claims no longer match the repo.
apps/storybook/.lab-readiness/
apps/storybook/.storybook/lab-readiness/
+
+# PR browser accessibility runner output (pnpm test:a11y-contract:pr)
+/pr-a11y-evidence/
+/pr-a11y-output/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 19d555e975..f04104bcd5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -503,6 +503,43 @@ src/Button/
└── Button.test.tsx # Tests live here
```
+### Where tests go, and how CI finds them
+
+CI collects tests by file name, never from a list of test files, so a new test
+needs no edit to `.github/workflows/`. Put the test where its kind is collected
+and CI picks it up:
+
+| Kind | Put it | Collected by | CI job |
+| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------- |
+| Unit and integration (jsdom or Node) | `*.test.ts(x)` / `*.test.mjs` beside the code, in a path the `ui` or `node` project of `vitest.config.ts` includes | the `ui` and `node` Vitest projects | `test-ui`, `test-node` (sharded) |
+| Browser accessibility or engine behavior | `*.a11y.chromium.spec.ts` (Chromium) or `*.a11y.browser.spec.ts` (Chromium and WebKit) under `packages/*/src/` | `pnpm test:a11y-contract`; pull requests run `pnpm test:a11y-contract:pr` | `pr-a11y`; every spec in the release check's `a11y-contracts` |
+| Visual regression | a Storybook story | the visual plan | `pr-visual` |
+
+A browser spec runs on a pull request when the PR changes the spec, its
+component folder, or the component it is named after (`ChatSendButton.a11y.chromium.spec.ts`
+belongs to `core/ChatSendButton`). Routing lines in the spec's header comment
+change that, and the runner rejects any other value:
+
+```ts
+// @pr-a11y always every PR that changes components
+// @pr-a11y scope core/Selector ^apps/storybook/stories/ComboboxA11y
+// also when one token matches: a component, or
+// a regular expression over changed paths
+// @pr-a11y audit DateInput only on a "[Component Audit] DateInput:" PR
+// @pr-a11y release-only never on a PR; the release check runs it
+```
+
+`pnpm test:a11y-contract:pr origin/main --dry-run` prints what a pull request
+from your branch would run (component tokens need CI's `analysis.json`; without
+it the runner says so and leaves those specs out). A spec writes its receipts under
+`test-results/<name>/` or, for a component audit, a top-level
+`<name>-audit-evidence/` folder; CI uploads them, with the selection and the
+reports, in one `pr-a11y-evidence-<sha>` artifact. A component-audit pull
+request whose component has an audit spec also runs that component's own axe
+pass; an audit that must wait for an open dialog or menu, grades a different
+component set, or has no audit spec has an entry in
+`.github/a11y-audit-axe.json`.
+
### Accessibility audits
PRs that touch components run an axe-core audit (the `pr-a11y` CI job) over
@@ -557,7 +594,8 @@ focus, or real activation is reported `unrun` there and proven in Chromium.
pnpm storybook:build
npx playwright install chromium
-pnpm test:a11y-contract # the Chromium lane (also runs inside pr-a11y)
+pnpm test:a11y-contract # the Chromium lane, every spec (the release check)
+pnpm test:a11y-contract:pr origin/main --dry-run # what a PR from this branch runs (drop --dry-run to run it)
```
Adopting the pattern in a new component means binding to the existing contract,
diff --git a/internal/a11y-spec/src/harness/chromium.chromium.spec.ts b/internal/a11y-spec/src/harness/chromium.chromium.spec.ts
index e44212da08..3b3129f6a7 100644
--- a/internal/a11y-spec/src/harness/chromium.chromium.spec.ts
+++ b/internal/a11y-spec/src/harness/chromium.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^internal/a11y-spec/src/harness
/**
* @file chromium.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/accordion.chromium.spec.ts b/internal/a11y-spec/src/patterns/accordion.chromium.spec.ts
index 526506f6d8..9b3219e308 100644
--- a/internal/a11y-spec/src/patterns/accordion.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/accordion.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/accordion|packages/core/src/Collapsible/|apps/storybook/stories/CollapsibleGroupA11y)
/**
* @file accordion.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/alert-dialog.chromium.spec.ts b/internal/a11y-spec/src/patterns/alert-dialog.chromium.spec.ts
index 18c0a8e734..005844923c 100644
--- a/internal/a11y-spec/src/patterns/alert-dialog.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/alert-dialog.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/alert-dialog|internal/a11y-spec/src/harness|packages/core/src/AlertDialog/|packages/core/src/Dialog/|apps/storybook/stories/AlertDialogA11y)
/**
* @file alert-dialog.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/breadcrumb.chromium.spec.ts b/internal/a11y-spec/src/patterns/breadcrumb.chromium.spec.ts
index da6a264e03..86bc7eb40f 100644
--- a/internal/a11y-spec/src/patterns/breadcrumb.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/breadcrumb.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/** Real-browser positive and mutation proof for the Breadcrumb contract. */
diff --git a/internal/a11y-spec/src/patterns/button.chromium.spec.ts b/internal/a11y-spec/src/patterns/button.chromium.spec.ts
index 273920976e..abdc5cdf0f 100644
--- a/internal/a11y-spec/src/patterns/button.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/button.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file button.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/carousel.chromium.spec.ts b/internal/a11y-spec/src/patterns/carousel.chromium.spec.ts
index e67c2b86a9..36ef1a0fc9 100644
--- a/internal/a11y-spec/src/patterns/carousel.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/carousel.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/carousel|packages/core/src/Carousel/|apps/storybook/stories/CarouselA11y)
/**
* @file carousel.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/checkbox.chromium.spec.ts b/internal/a11y-spec/src/patterns/checkbox.chromium.spec.ts
index 4b9601f669..6d5ee55819 100644
--- a/internal/a11y-spec/src/patterns/checkbox.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/checkbox.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file checkbox.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/combobox.chromium.spec.ts b/internal/a11y-spec/src/patterns/combobox.chromium.spec.ts
index 357bcdbb02..63c79fe789 100644
--- a/internal/a11y-spec/src/patterns/combobox.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/combobox.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope core/Selector ^(internal/a11y-spec/src/patterns/combobox|apps/storybook/stories/ComboboxA11y)
/** Real-browser positive and mutation proof for the Combobox contract. */
diff --git a/internal/a11y-spec/src/patterns/disclosure.chromium.spec.ts b/internal/a11y-spec/src/patterns/disclosure.chromium.spec.ts
index b6d73b3a92..25754d7c0b 100644
--- a/internal/a11y-spec/src/patterns/disclosure.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/disclosure.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file disclosure.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/grid.chromium.spec.ts b/internal/a11y-spec/src/patterns/grid.chromium.spec.ts
index e513a00a2d..469bf033bf 100644
--- a/internal/a11y-spec/src/patterns/grid.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/grid.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/grid|internal/a11y-spec/src/harness|packages/core/src/Calendar/|packages/core/src/hooks/useGridFocus|apps/storybook/stories/CalendarGridA11y)
/**
* @file grid.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/landmark.chromium.spec.ts b/internal/a11y-spec/src/patterns/landmark.chromium.spec.ts
index 507fc089b0..0646db9271 100644
--- a/internal/a11y-spec/src/patterns/landmark.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/landmark.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/landmark|packages/core/src/Layout/|apps/storybook/stories/LayoutLandmarkA11y)
/** Real-browser positive and mutation proof for the Landmark contract. */
diff --git a/internal/a11y-spec/src/patterns/link.chromium.spec.ts b/internal/a11y-spec/src/patterns/link.chromium.spec.ts
index 28ffc41afc..7edfad6d10 100644
--- a/internal/a11y-spec/src/patterns/link.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/link.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/link\.|packages/core/src/Link/|apps/storybook/stories/LinkA11y)
/**
* @file link.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/listbox.chromium.spec.ts b/internal/a11y-spec/src/patterns/listbox.chromium.spec.ts
index b96d8cacbf..469770fd04 100644
--- a/internal/a11y-spec/src/patterns/listbox.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/listbox.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file listbox.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/menu-button.chromium.spec.ts b/internal/a11y-spec/src/patterns/menu-button.chromium.spec.ts
index e4c2d78f38..d4367e43bc 100644
--- a/internal/a11y-spec/src/patterns/menu-button.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/menu-button.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/menu-button|packages/core/src/DropdownMenu/|packages/core/src/MoreMenu/|apps/storybook/stories/MenuButtonA11y)
/**
* @file menu-button.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/menu.chromium.spec.ts b/internal/a11y-spec/src/patterns/menu.chromium.spec.ts
index aedb63b198..6f93e1eef5 100644
--- a/internal/a11y-spec/src/patterns/menu.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/menu.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/menu\.|packages/core/src/DropdownMenu/|apps/storybook/stories/MenuA11y)
/**
* @file menu.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/modal-dialog.chromium.spec.ts b/internal/a11y-spec/src/patterns/modal-dialog.chromium.spec.ts
index aaff6a4664..347084bf46 100644
--- a/internal/a11y-spec/src/patterns/modal-dialog.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/modal-dialog.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file modal-dialog.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/progressbar.chromium.spec.ts b/internal/a11y-spec/src/patterns/progressbar.chromium.spec.ts
index 33ea8da27f..61a9179c4d 100644
--- a/internal/a11y-spec/src/patterns/progressbar.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/progressbar.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/progressbar\.|packages/core/src/ProgressBar/|packages/lab/src/CircularProgress/|apps/storybook/stories/ProgressbarA11y)
/**
* @file progressbar.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/radio-group.chromium.spec.ts b/internal/a11y-spec/src/patterns/radio-group.chromium.spec.ts
index cbeada1861..e7be54fbcc 100644
--- a/internal/a11y-spec/src/patterns/radio-group.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/radio-group.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file radio-group.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/slider.chromium.spec.ts b/internal/a11y-spec/src/patterns/slider.chromium.spec.ts
index 9b77a57488..931fbeb6de 100644
--- a/internal/a11y-spec/src/patterns/slider.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/slider.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/slider|internal/a11y-spec/src/harness|packages/core/src/Slider/|apps/storybook/stories/SliderA11y)
/**
* @file slider.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/spinbutton.chromium.spec.ts b/internal/a11y-spec/src/patterns/spinbutton.chromium.spec.ts
index d72c168086..903907ddf6 100644
--- a/internal/a11y-spec/src/patterns/spinbutton.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/spinbutton.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/** Chromium positive, exact-debt, and mutation proof for the shared Spinbutton contract. */
diff --git a/internal/a11y-spec/src/patterns/status-message.chromium.spec.ts b/internal/a11y-spec/src/patterns/status-message.chromium.spec.ts
index 4fc138222f..534a1daf8f 100644
--- a/internal/a11y-spec/src/patterns/status-message.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/status-message.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file status-message.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/switch.chromium.spec.ts b/internal/a11y-spec/src/patterns/switch.chromium.spec.ts
index 6c8fa1c484..2274d5c4a2 100644
--- a/internal/a11y-spec/src/patterns/switch.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/switch.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file switch.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/table.chromium.spec.ts b/internal/a11y-spec/src/patterns/table.chromium.spec.ts
index 1e1b5f2bc9..e4de91fb65 100644
--- a/internal/a11y-spec/src/patterns/table.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/table.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/table\.|packages/core/src/Table/|apps/storybook/stories/TableA11y)
/** Real-browser positive and mutation proof for the Table contract. */
diff --git a/internal/a11y-spec/src/patterns/tabs.chromium.spec.ts b/internal/a11y-spec/src/patterns/tabs.chromium.spec.ts
index f2448fc3c6..d4bb9d3beb 100644
--- a/internal/a11y-spec/src/patterns/tabs.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/tabs.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file tabs.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/text-input.chromium.spec.ts b/internal/a11y-spec/src/patterns/text-input.chromium.spec.ts
index bf19034852..dcb4c2e3be 100644
--- a/internal/a11y-spec/src/patterns/text-input.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/text-input.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file text-input.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/toggle-button.chromium.spec.ts b/internal/a11y-spec/src/patterns/toggle-button.chromium.spec.ts
index 2828022627..bfd658882b 100644
--- a/internal/a11y-spec/src/patterns/toggle-button.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/toggle-button.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope core/ToggleButton ^internal/a11y-spec/src/patterns/toggle-button
/**
* @file toggle-button.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/toolbar.chromium.spec.ts b/internal/a11y-spec/src/patterns/toolbar.chromium.spec.ts
index c72e9808ce..674235965d 100644
--- a/internal/a11y-spec/src/patterns/toolbar.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/toolbar.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/toolbar\.|packages/core/src/Toolbar/|apps/storybook/stories/ToolbarA11y)
/**
* @file toolbar.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/tooltip.chromium.spec.ts b/internal/a11y-spec/src/patterns/tooltip.chromium.spec.ts
index a1dc3e725d..1250dea8dc 100644
--- a/internal/a11y-spec/src/patterns/tooltip.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/tooltip.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/tooltip\.|packages/core/src/Tooltip/|apps/storybook/stories/TooltipA11y)
/**
* @file tooltip.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/tree-view.chromium.spec.ts b/internal/a11y-spec/src/patterns/tree-view.chromium.spec.ts
index feccc93678..17fd29d8e1 100644
--- a/internal/a11y-spec/src/patterns/tree-view.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/tree-view.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/tree-view|internal/a11y-spec/src/harness|packages/core/src/TreeList/|packages/core/src/hooks/useTreeFocus|apps/storybook/stories/TreeListTreeViewA11y)
/**
* @file tree-view.chromium.spec.ts
diff --git a/internal/a11y-spec/src/patterns/window-splitter.chromium.spec.ts b/internal/a11y-spec/src/patterns/window-splitter.chromium.spec.ts
index 2269739905..a061060189 100644
--- a/internal/a11y-spec/src/patterns/window-splitter.chromium.spec.ts
+++ b/internal/a11y-spec/src/patterns/window-splitter.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/window-splitter|internal/a11y-spec/src/harness|packages/core/src/Resizable/|apps/storybook/stories/WindowSplitterA11y)
/**
* @file window-splitter.chromium.spec.ts
diff --git a/package.json b/package.json
index 8c0f8298c7..53562fb351 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,7 @@
"test:build": "vitest run packages/build/src/packed-consumer.test.mjs --project node --maxWorkers=1 && pnpm -F @astryxdesign/build build && node .github/scripts/theme-layer-cascade.js && ASTRYX_STYLEX_BROWSER=1 vitest run scripts/stylex-module-resolution.browser.test.mjs --project node --maxWorkers=1",
"test:theme-family": "pnpm -F @astryxdesign/core build && pnpm -F @astryxdesign/sandbox generate:theme-family && node .github/scripts/theme-family-cascade.js",
"test:a11y-contract": "playwright test --config playwright.config.ts --project chromium",
+ "test:a11y-contract:pr": "node .github/scripts/a11y-pr-contracts.mjs",
"test:docsite-browser": "playwright test --config apps/docsite/playwright.config.ts",
"typecheck": "pnpm -r --no-bail --workspace-concurrency=1 --if-present --filter \"!@astryxdesign/docsite\" --filter \"!@astryxdesign/sandbox\" run typecheck",
"check:package-boundaries": "node scripts/check-package-boundaries.js",
diff --git a/packages/core/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts b/packages/core/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts
index fb5f85ccaa..7f6c000168 100644
--- a/packages/core/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts
+++ b/packages/core/src/AlertDialog/__tests__/AlertDialog.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/alert-dialog|internal/a11y-spec/src/harness|packages/core/src/AlertDialog/|packages/core/src/Dialog/|apps/storybook/stories/AlertDialogA11y)
/**
* @file AlertDialog.a11y.chromium.spec.ts
diff --git a/packages/core/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts b/packages/core/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts
index ad581c22f3..2976a2212e 100644
--- a/packages/core/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts
+++ b/packages/core/src/AspectRatio/__tests__/AspectRatioFitLayers.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file AspectRatioFitLayers.a11y.browser.spec.ts
diff --git a/packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts b/packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts
index 7158f29069..01dd2de446 100644
--- a/packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts
+++ b/packages/core/src/BottomSheet/__tests__/BottomSheetDrag.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file BottomSheetDrag.a11y.chromium.spec.ts
diff --git a/packages/core/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts b/packages/core/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts
index fed0626bb8..d81885bcab 100644
--- a/packages/core/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts
+++ b/packages/core/src/BottomSheet/__tests__/BottomSheetFocusReturn.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file BottomSheetFocusReturn.a11y.browser.spec.ts
diff --git a/packages/core/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts b/packages/core/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts
index 4ea75abfcc..c70fdce53c 100644
--- a/packages/core/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts
+++ b/packages/core/src/BottomSheet/__tests__/BottomSheetKeyboard.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file BottomSheetKeyboard.a11y.browser.spec.ts
diff --git a/packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts b/packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts
index 0bf9bc24f7..1019778c8c 100644
--- a/packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts
+++ b/packages/core/src/BottomSheet/__tests__/BottomSheetNativeModal.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file BottomSheetNativeModal.a11y.browser.spec.ts
diff --git a/packages/core/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts b/packages/core/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts
index e99865bbd5..8304bc316e 100644
--- a/packages/core/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts
+++ b/packages/core/src/BottomSheet/__tests__/BottomSheetPinchZoom.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file BottomSheetPinchZoom.a11y.chromium.spec.ts
diff --git a/packages/core/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts b/packages/core/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts
index c024fa7792..89d1497103 100644
--- a/packages/core/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts
+++ b/packages/core/src/BottomSheet/__tests__/BottomSheetToastOutlet.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file BottomSheetToastOutlet.a11y.chromium.spec.ts
diff --git a/packages/core/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts b/packages/core/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts
index 21f48c0180..4b6daf679e 100644
--- a/packages/core/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts
+++ b/packages/core/src/Breadcrumbs/__tests__/Breadcrumbs.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/** Real-browser and accessibility-tree binding evidence for Breadcrumbs. */
diff --git a/packages/core/src/Button/__tests__/Button.a11y.chromium.spec.ts b/packages/core/src/Button/__tests__/Button.a11y.chromium.spec.ts
index ae1974197b..729a90e7f1 100644
--- a/packages/core/src/Button/__tests__/Button.a11y.chromium.spec.ts
+++ b/packages/core/src/Button/__tests__/Button.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Button.a11y.chromium.spec.ts
diff --git a/packages/core/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts b/packages/core/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts
index d85847c19f..bc69c70269 100644
--- a/packages/core/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts
+++ b/packages/core/src/Calendar/__tests__/Calendar.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/grid|internal/a11y-spec/src/harness|packages/core/src/Calendar/|packages/core/src/hooks/useGridFocus|apps/storybook/stories/CalendarGridA11y)
/**
* @file Calendar.a11y.chromium.spec.ts
diff --git a/packages/core/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts b/packages/core/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts
index 297e2ba41d..5e3bc9f0d2 100644
--- a/packages/core/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts
+++ b/packages/core/src/Carousel/__tests__/Carousel.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/carousel|packages/core/src/Carousel/|apps/storybook/stories/CarouselA11y)
/**
* @file Carousel.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts
index 893cda96ce..ccf2344827 100644
--- a/packages/core/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatLayoutScrollButton.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file ChatLayoutScrollButton.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts
index 4a1ae507ae..ce1d79e2b3 100644
--- a/packages/core/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file ChatLayoutScrollButtonSurface.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts
index 95317b150d..61d6cc85d5 100644
--- a/packages/core/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatMessageList.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ChatMessageList
/**
* @file ChatMessageList.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts
index a7cc32c97a..2edd28fb3b 100644
--- a/packages/core/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatMessageMetadata.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ChatMessageMetadata
/**
* @file ChatMessageMetadata.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts
index c147dd8d7e..34fa05949a 100644
--- a/packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatSendButton.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ChatSendButton
/**
* @file ChatSendButton.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts
index 3a0ddf8a2c..3fc41530ea 100644
--- a/packages/core/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatSystemMessage.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ChatSystemMessage
/**
* @file ChatSystemMessage.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts
index 055c76beab..c046c6ac0b 100644
--- a/packages/core/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/ChatTokenizedText.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ChatTokenizedText
/**
* @file ChatTokenizedText.a11y.chromium.spec.ts
diff --git a/packages/core/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts b/packages/core/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts
index a2759616aa..762fa37ee4 100644
--- a/packages/core/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts
+++ b/packages/core/src/Chat/__tests__/useChatStreamScroll.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file useChatStreamScroll.a11y.chromium.spec.ts
diff --git a/packages/core/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts b/packages/core/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts
index 8b78bf2af1..49c6f48d53 100644
--- a/packages/core/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts
+++ b/packages/core/src/CheckboxInput/__tests__/Checkbox.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CheckboxList, CheckboxListItem
/**
* @file Checkbox.a11y.chromium.spec.ts
diff --git a/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts b/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts
index 9726eb9f9a..c477436950 100644
--- a/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts
+++ b/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CheckboxList, CheckboxListItem
/**
* @file CheckboxList.a11y.chromium.spec.ts
diff --git a/packages/core/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts b/packages/core/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts
index 8e5249adc5..0e8c10e0e5 100644
--- a/packages/core/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts
+++ b/packages/core/src/CodeBlock/__tests__/CodeBlockCopyClearance.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file CodeBlockCopyClearance.a11y.chromium.spec.ts
diff --git a/packages/core/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts b/packages/core/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts
index 29c2f6a1ed..9c999a4973 100644
--- a/packages/core/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts
+++ b/packages/core/src/CodeBlock/__tests__/CodeBlockOverflowStop.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file CodeBlockOverflowStop.a11y.chromium.spec.ts
diff --git a/packages/core/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts b/packages/core/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts
index 7f2df7731d..e68fd0e3c3 100644
--- a/packages/core/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts
+++ b/packages/core/src/CodeBlock/__tests__/DiffRowPaint.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file DiffRowPaint.a11y.chromium.spec.ts
diff --git a/packages/core/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts b/packages/core/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts
index a91f2d2881..7470291664 100644
--- a/packages/core/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts
+++ b/packages/core/src/Collapsible/__tests__/Collapsible.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Collapsible.a11y.chromium.spec.ts
diff --git a/packages/core/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts b/packages/core/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts
index 6f855df215..982cc6d662 100644
--- a/packages/core/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts
+++ b/packages/core/src/Collapsible/__tests__/CollapsibleGroup.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CollapsibleGroup
/**
* @file CollapsibleGroup.a11y.chromium.spec.ts
diff --git a/packages/core/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts b/packages/core/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts
index b8bc331992..d9b70c4928 100644
--- a/packages/core/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts
+++ b/packages/core/src/Collapsible/__tests__/CollapsibleGroupAccordion.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/accordion|packages/core/src/Collapsible/|apps/storybook/stories/CollapsibleGroupA11y)
/**
* @file CollapsibleGroupAccordion.a11y.chromium.spec.ts
diff --git a/packages/core/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts b/packages/core/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts
index 6dfddd6bd5..0677aea370 100644
--- a/packages/core/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts
+++ b/packages/core/src/CommandPalette/__tests__/CommandPalette.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CommandPalette
/**
* @file CommandPalette.a11y.chromium.spec.ts
diff --git a/packages/core/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts b/packages/core/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts
index 22515a696f..8f6105c073 100644
--- a/packages/core/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts
+++ b/packages/core/src/CommandPalette/__tests__/CommandPaletteFooter.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CommandPaletteFooter
/**
* @file CommandPaletteFooter.a11y.chromium.spec.ts
diff --git a/packages/core/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts b/packages/core/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts
index cfe8afcb8a..78a6cae00a 100644
--- a/packages/core/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/CommandPalette/__tests__/CommandPaletteInputAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CommandPaletteInput
/**
* @file CommandPaletteInputAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts b/packages/core/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts
index e5ece23706..75c2e23557 100644
--- a/packages/core/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/CommandPalette/__tests__/CommandPaletteItemAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit CommandPaletteItem
/**
* @file CommandPaletteItemAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts b/packages/core/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts
index d8df337f6b..5b6d1d7b2d 100644
--- a/packages/core/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts
+++ b/packages/core/src/ComplexSelector/__tests__/ComplexSelector.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ComplexSelector
/**
* @file ComplexSelector.a11y.chromium.spec.ts
diff --git a/packages/core/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts b/packages/core/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts
index 8a08e78880..143275d84c 100644
--- a/packages/core/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/ContextMenu/__tests__/ContextMenuAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit ContextMenu
/**
* @file ContextMenuAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts b/packages/core/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts
index 605dabbb51..ccbd24337d 100644
--- a/packages/core/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts
+++ b/packages/core/src/ContextMenu/__tests__/ContextMenuCursorAnchor.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file ContextMenuCursorAnchor.a11y.browser.spec.ts
diff --git a/packages/core/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts b/packages/core/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts
index 4a16238382..0f5b0f15de 100644
--- a/packages/core/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DateInput/__tests__/DateInputAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DateInput
/**
* @file DateInputAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts b/packages/core/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts
index 4b4cc82660..4f4b7241a5 100644
--- a/packages/core/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts
+++ b/packages/core/src/DateInput/__tests__/WheelPinchZoom.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file WheelPinchZoom.a11y.chromium.spec.ts
diff --git a/packages/core/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts b/packages/core/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts
index b63d51508a..f8c4c2cac9 100644
--- a/packages/core/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts
+++ b/packages/core/src/Dialog/__tests__/Dialog.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Dialog.a11y.browser.spec.ts
diff --git a/packages/core/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts b/packages/core/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts
index 36069aadb9..3d6a758211 100644
--- a/packages/core/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts
+++ b/packages/core/src/Dialog/__tests__/Dialog.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Dialog.a11y.chromium.spec.ts
diff --git a/packages/core/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts b/packages/core/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts
index 24fdc30e60..19d3b9444c 100644
--- a/packages/core/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts
+++ b/packages/core/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Dialog.reduced-motion.a11y.browser.spec.ts
diff --git a/packages/core/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts b/packages/core/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts
index 6247f4413c..f87f20d5cd 100644
--- a/packages/core/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/Drawer/__tests__/DrawerAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit Drawer
/**
* @file DrawerAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts b/packages/core/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts
index c8dcf09c9f..c1679c6a59 100644
--- a/packages/core/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/Drawer/__tests__/DrawerHeaderAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DrawerHeader
/**
* @file DrawerHeaderAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts
index f749dd8df1..cbacd54ed9 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuDividerAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DropdownMenuDivider
/**
* @file DropdownMenuDividerAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts
index 9a4f4224c9..8621a1ecea 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuDrillIn.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file DropdownMenuDrillIn.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts
index 34bcc956a0..f9dc9f05c3 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuFocusReturn.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file DropdownMenuFocusReturn.a11y.browser.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts
index 7cf00b773e..8e384842df 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuGroupAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DropdownMenuGroup
/**
* @file DropdownMenuGroupAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts
index aad2c1c656..a782c495d7 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuItemAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DropdownMenuItem
/**
* @file DropdownMenuItemAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts
index 2a200af3b6..68f2180d3d 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DropdownMenuRadioGroup
/**
* @file DropdownMenuRadioGroupAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts
index 1d0eba82d8..6253db61fc 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuRadioItemAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DropdownMenuRadioItem
/**
* @file DropdownMenuRadioItemAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts
index b8edf27877..37808e4bcb 100644
--- a/packages/core/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/DropdownMenuSubMenuAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit DropdownMenuSubMenu
/**
* @file DropdownMenuSubMenuAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts
index 00228a5870..3e348361e2 100644
--- a/packages/core/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/Menu.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/menu\.|packages/core/src/DropdownMenu/|apps/storybook/stories/MenuA11y)
/**
* @file Menu.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts
index fd45da35bd..b18b887ec9 100644
--- a/packages/core/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/MenuButton.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/menu-button|packages/core/src/DropdownMenu/|packages/core/src/MoreMenu/|apps/storybook/stories/MenuButtonA11y)
/**
* @file MenuButton.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts
index c95d5a3073..d37f4a46aa 100644
--- a/packages/core/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/MenuHeaderFooter.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file MenuHeaderFooter.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts
index b926af31cf..9ed90148b2 100644
--- a/packages/core/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/MenuHoverFocus.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file MenuHoverFocus.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts
index 18087a9a5f..f9158bed39 100644
--- a/packages/core/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/MenuPinchZoom.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MenuPinchZoom.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts
index 273d589aba..ead2337837 100644
--- a/packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/MenuPress.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MenuPress.a11y.chromium.spec.ts
diff --git a/packages/core/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts b/packages/core/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts
index 767655973c..0e54caf2bb 100644
--- a/packages/core/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts
+++ b/packages/core/src/DropdownMenu/__tests__/SubMenuHeaderFooter.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file SubMenuHeaderFooter.a11y.chromium.spec.ts
diff --git a/packages/core/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts b/packages/core/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts
index b673298685..160ab51383 100644
--- a/packages/core/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/Field/__tests__/FieldLabelAudit.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y audit FieldLabel
/**
* @file FieldLabelAudit.a11y.chromium.spec.ts
diff --git a/packages/core/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts b/packages/core/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts
index 031b7cef2b..448dc796fd 100644
--- a/packages/core/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts
+++ b/packages/core/src/FieldStatus/__tests__/StatusMessage.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file StatusMessage.a11y.chromium.spec.ts
diff --git a/packages/core/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts b/packages/core/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts
index cf1696734c..c380161273 100644
--- a/packages/core/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts
+++ b/packages/core/src/Item/__tests__/ItemSwipeActions.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file ItemSwipeActions.a11y.chromium.spec.ts
diff --git a/packages/core/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts b/packages/core/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts
index d3df5e667b..d36a349d51 100644
--- a/packages/core/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts
+++ b/packages/core/src/Item/__tests__/ItemSwipePinchZoom.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file ItemSwipePinchZoom.a11y.chromium.spec.ts
diff --git a/packages/core/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts b/packages/core/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts
index 0ac8e07239..fe23ac30b9 100644
--- a/packages/core/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts
+++ b/packages/core/src/Layer/__tests__/LayerReducedMotion.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file LayerReducedMotion.a11y.chromium.spec.ts
diff --git a/packages/core/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts b/packages/core/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts
index edc9495cfd..bc1f163433 100644
--- a/packages/core/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts
+++ b/packages/core/src/Layer/__tests__/TouchTrigger.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file TouchTrigger.a11y.chromium.spec.ts
diff --git a/packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts b/packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts
index 53a03519d6..c7b0d1ba55 100644
--- a/packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts
+++ b/packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/landmark|packages/core/src/Layout/|apps/storybook/stories/LayoutLandmarkA11y)
/** Real-browser and accessibility-tree binding evidence for Layout regions. */
diff --git a/packages/core/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts b/packages/core/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts
index 3fbe990507..01a6e0af3a 100644
--- a/packages/core/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts
+++ b/packages/core/src/Lightbox/LightboxKeyboard.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file LightboxKeyboard.a11y.browser.spec.ts
diff --git a/packages/core/src/Link/__tests__/Link.a11y.chromium.spec.ts b/packages/core/src/Link/__tests__/Link.a11y.chromium.spec.ts
index e98e950b1e..87555a77f3 100644
--- a/packages/core/src/Link/__tests__/Link.a11y.chromium.spec.ts
+++ b/packages/core/src/Link/__tests__/Link.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/link\.|packages/core/src/Link/|apps/storybook/stories/LinkA11y)
/**
* Real-browser and accessibility-tree binding evidence for Link.
diff --git a/packages/core/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts b/packages/core/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts
index 3beab5bdd0..9363ffce1a 100644
--- a/packages/core/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts
+++ b/packages/core/src/Link/__tests__/Link.navigation.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Link.navigation.a11y.chromium.spec.ts
diff --git a/packages/core/src/Markdown/MarkdownTable.a11y.chromium.spec.ts b/packages/core/src/Markdown/MarkdownTable.a11y.chromium.spec.ts
index 52b7f5bcd0..3f24ff1cfd 100644
--- a/packages/core/src/Markdown/MarkdownTable.a11y.chromium.spec.ts
+++ b/packages/core/src/Markdown/MarkdownTable.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MarkdownTable.a11y.chromium.spec.ts
diff --git a/packages/core/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts b/packages/core/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts
index ab82c9aa3d..139aa47818 100644
--- a/packages/core/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts
+++ b/packages/core/src/Markdown/__tests__/MarkdownNesting.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MarkdownNesting.a11y.chromium.spec.ts
diff --git a/packages/core/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts b/packages/core/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts
index 7f11176fe4..fcfbf40f9b 100644
--- a/packages/core/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts
+++ b/packages/core/src/MobileNav/MobileNavPinchZoom.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MobileNavPinchZoom.a11y.chromium.spec.ts
diff --git a/packages/core/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts b/packages/core/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts
index b3c18548ac..0b176339f0 100644
--- a/packages/core/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts
+++ b/packages/core/src/MobileNav/__tests__/MobileNavWidth.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file MobileNavWidth.a11y.chromium.spec.ts
diff --git a/packages/core/src/MultiSelector/CreateRow.a11y.chromium.spec.ts b/packages/core/src/MultiSelector/CreateRow.a11y.chromium.spec.ts
index 2e27242fdb..96c0f447e1 100644
--- a/packages/core/src/MultiSelector/CreateRow.a11y.chromium.spec.ts
+++ b/packages/core/src/MultiSelector/CreateRow.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file CreateRow.a11y.chromium.spec.ts
diff --git a/packages/core/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts b/packages/core/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts
index f643f4dcc8..fa581966a9 100644
--- a/packages/core/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts
+++ b/packages/core/src/MultiSelector/MultiSelector.disabledFocus.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file MultiSelector.disabledFocus.a11y.chromium.spec.ts
diff --git a/packages/core/src/MultiSelector/OptionActions.a11y.chromium.spec.ts b/packages/core/src/MultiSelector/OptionActions.a11y.chromium.spec.ts
index f056c26232..f336979d08 100644
--- a/packages/core/src/MultiSelector/OptionActions.a11y.chromium.spec.ts
+++ b/packages/core/src/MultiSelector/OptionActions.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file OptionActions.a11y.chromium.spec.ts
diff --git a/packages/core/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts b/packages/core/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts
index c786959124..6575a55e5a 100644
--- a/packages/core/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts
+++ b/packages/core/src/MultiSelector/__tests__/MultiSelector.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MultiSelector.a11y.chromium.spec.ts
diff --git a/packages/core/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts b/packages/core/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts
index c4588d1626..d21ba54d31 100644
--- a/packages/core/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts
+++ b/packages/core/src/NumberInput/__tests__/NumberInput.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/** Real-browser and accessibility-tree binding evidence for NumberInput. */
diff --git a/packages/core/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts b/packages/core/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts
index c7ea319c4e..a0bc30e406 100644
--- a/packages/core/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts
+++ b/packages/core/src/Popover/__tests__/PopoverSecondDocument.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file PopoverSecondDocument.a11y.chromium.spec.ts
diff --git a/packages/core/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts b/packages/core/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts
index fce24c6287..55452b0aae 100644
--- a/packages/core/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts
+++ b/packages/core/src/ProgressBar/__tests__/ProgressBar.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/progressbar\.|packages/core/src/ProgressBar/|packages/lab/src/CircularProgress/|apps/storybook/stories/ProgressbarA11y)
/**
* @file ProgressBar.a11y.chromium.spec.ts
diff --git a/packages/core/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts b/packages/core/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts
index e5ab6a10a9..49c1822693 100644
--- a/packages/core/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts
+++ b/packages/core/src/RadioList/__tests__/RadioGroup.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file RadioGroup.a11y.chromium.spec.ts
diff --git a/packages/core/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts b/packages/core/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts
index 1acf7f63c2..553aed2568 100644
--- a/packages/core/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts
+++ b/packages/core/src/Resizable/__tests__/ResizeHandle.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/window-splitter|internal/a11y-spec/src/harness|packages/core/src/Resizable/|apps/storybook/stories/WindowSplitterA11y)
/**
* @file ResizeHandle.a11y.chromium.spec.ts
diff --git a/packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts b/packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts
index 85cd041995..3eb29afabb 100644
--- a/packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts
+++ b/packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file EmptyStateAnnouncement.a11y.chromium.spec.ts
diff --git a/packages/core/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts b/packages/core/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts
index 54c5f78047..494a8d6fc8 100644
--- a/packages/core/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts
+++ b/packages/core/src/Selector/__tests__/Listbox.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Listbox.a11y.chromium.spec.ts
diff --git a/packages/core/src/Selector/__tests__/Selector.a11y.chromium.spec.ts b/packages/core/src/Selector/__tests__/Selector.a11y.chromium.spec.ts
index 5f9a2c4325..bffb544591 100644
--- a/packages/core/src/Selector/__tests__/Selector.a11y.chromium.spec.ts
+++ b/packages/core/src/Selector/__tests__/Selector.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Selector.a11y.chromium.spec.ts
diff --git a/packages/core/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts b/packages/core/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts
index c151e0538e..6d2a83a788 100644
--- a/packages/core/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts
+++ b/packages/core/src/Selector/__tests__/Selector.combobox.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/combobox|apps/storybook/stories/ComboboxA11y)
/** Chromium accessibility-tree and relationship proof for Selector's Combobox binding. */
diff --git a/packages/core/src/Slider/__tests__/Slider.a11y.chromium.spec.ts b/packages/core/src/Slider/__tests__/Slider.a11y.chromium.spec.ts
index 488a91ce68..ff6b804830 100644
--- a/packages/core/src/Slider/__tests__/Slider.a11y.chromium.spec.ts
+++ b/packages/core/src/Slider/__tests__/Slider.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/slider|internal/a11y-spec/src/harness|packages/core/src/Slider/|apps/storybook/stories/SliderA11y)
/**
* @file Slider.a11y.chromium.spec.ts
diff --git a/packages/core/src/Switch/__tests__/Switch.a11y.chromium.spec.ts b/packages/core/src/Switch/__tests__/Switch.a11y.chromium.spec.ts
index 7bd3edf3ef..9c04dde524 100644
--- a/packages/core/src/Switch/__tests__/Switch.a11y.chromium.spec.ts
+++ b/packages/core/src/Switch/__tests__/Switch.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Switch.a11y.chromium.spec.ts
diff --git a/packages/core/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts b/packages/core/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts
index 90910f6c5b..f6547200b1 100644
--- a/packages/core/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts
+++ b/packages/core/src/TabList/__tests__/Tabs.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Tabs.a11y.chromium.spec.ts
diff --git a/packages/core/src/Table/__tests__/Table.a11y.chromium.spec.ts b/packages/core/src/Table/__tests__/Table.a11y.chromium.spec.ts
index 0ac4720992..f2c6adf146 100644
--- a/packages/core/src/Table/__tests__/Table.a11y.chromium.spec.ts
+++ b/packages/core/src/Table/__tests__/Table.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/table\.|packages/core/src/Table/|apps/storybook/stories/TableA11y)
/** Real-browser and accessibility-tree binding evidence for Table. */
diff --git a/packages/core/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts b/packages/core/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts
index 71aaa37ffe..6865556512 100644
--- a/packages/core/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts
+++ b/packages/core/src/Table/__tests__/TableMinWidth.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file TableMinWidth.a11y.chromium.spec.ts
diff --git a/packages/core/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts b/packages/core/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts
index 02aadb24be..21f08a27ed 100644
--- a/packages/core/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts
+++ b/packages/core/src/Table/__tests__/TableScroll.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file TableScroll.a11y.chromium.spec.ts
diff --git a/packages/core/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts b/packages/core/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts
index 269f84126e..09ca28a7aa 100644
--- a/packages/core/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts
+++ b/packages/core/src/TextInput/__tests__/TextInput.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file TextInput.a11y.chromium.spec.ts
diff --git a/packages/core/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts b/packages/core/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts
index 98af004b30..123e96b855 100644
--- a/packages/core/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts
+++ b/packages/core/src/ToggleButton/__tests__/ToggleButton.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^internal/a11y-spec/src/patterns/toggle-button
/**
* @file ToggleButton.a11y.chromium.spec.ts
diff --git a/packages/core/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts b/packages/core/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts
index b991ebf61b..d71adb5461 100644
--- a/packages/core/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts
+++ b/packages/core/src/Token/__tests__/TokenRemoveTarget.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file TokenRemoveTarget.a11y.chromium.spec.ts
diff --git a/packages/core/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts b/packages/core/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts
index a3f597a470..e72aab887f 100644
--- a/packages/core/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts
+++ b/packages/core/src/Tokenizer/__tests__/TokenizerEndLane.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file TokenizerEndLane.a11y.chromium.spec.ts
diff --git a/packages/core/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts b/packages/core/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts
index 7ec9251b2d..e841fa7b76 100644
--- a/packages/core/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts
+++ b/packages/core/src/Toolbar/__tests__/Toolbar.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/toolbar\.|packages/core/src/Toolbar/|apps/storybook/stories/ToolbarA11y)
/**
* @file Toolbar.a11y.chromium.spec.ts
diff --git a/packages/core/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts b/packages/core/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts
index d15d43baa9..0619e4895c 100644
--- a/packages/core/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts
+++ b/packages/core/src/Tooltip/__tests__/Tooltip.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/tooltip\.|packages/core/src/Tooltip/|apps/storybook/stories/TooltipA11y)
/**
* @file Tooltip.a11y.chromium.spec.ts
diff --git a/packages/core/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts b/packages/core/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts
index 924084817a..4ed0e841b3 100644
--- a/packages/core/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts
+++ b/packages/core/src/Tooltip/__tests__/TooltipFocusReturn.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file TooltipFocusReturn.a11y.chromium.spec.ts
diff --git a/packages/core/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts b/packages/core/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts
index 8c2b7723cb..b9e5f06903 100644
--- a/packages/core/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts
+++ b/packages/core/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file TooltipHoverBridge.a11y.chromium.spec.ts
diff --git a/packages/core/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts b/packages/core/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts
index 4c5873f7c2..5028235371 100644
--- a/packages/core/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts
+++ b/packages/core/src/TopNav/__tests__/TopNavMobileLongHeading.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file TopNavMobileLongHeading.a11y.chromium.spec.ts
diff --git a/packages/core/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts b/packages/core/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts
index 452f70b8fd..3e21e61424 100644
--- a/packages/core/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts
+++ b/packages/core/src/TreeList/__tests__/TreeList.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/tree-view|internal/a11y-spec/src/harness|packages/core/src/TreeList/|packages/core/src/hooks/useTreeFocus|apps/storybook/stories/TreeListTreeViewA11y)
/**
* @file TreeList.a11y.chromium.spec.ts
diff --git a/packages/core/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts b/packages/core/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts
index 047b11bed8..95c050b112 100644
--- a/packages/core/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts
+++ b/packages/core/src/TreeList/__tests__/TreeListRowNames.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(packages/core/src/TreeList/|packages/core/src/hooks/useTreeFocus|apps/storybook/stories/TreeListA11y)
/**
* @file TreeListRowNames.a11y.chromium.spec.ts
diff --git a/packages/core/src/__tests__/CardPress.a11y.chromium.spec.ts b/packages/core/src/__tests__/CardPress.a11y.chromium.spec.ts
index 9fa4887123..34e60c41ea 100644
--- a/packages/core/src/__tests__/CardPress.a11y.chromium.spec.ts
+++ b/packages/core/src/__tests__/CardPress.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file CardPress.a11y.chromium.spec.ts
diff --git a/packages/core/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts b/packages/core/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts
index 05c1671401..2cb1d81426 100644
--- a/packages/core/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts
+++ b/packages/core/src/__tests__/DisabledTriggerFocus.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file DisabledTriggerFocus.a11y.chromium.spec.ts
diff --git a/packages/core/src/__tests__/PressedState.a11y.chromium.spec.ts b/packages/core/src/__tests__/PressedState.a11y.chromium.spec.ts
index 0ba695d807..dd9da6d10f 100644
--- a/packages/core/src/__tests__/PressedState.a11y.chromium.spec.ts
+++ b/packages/core/src/__tests__/PressedState.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file PressedState.a11y.chromium.spec.ts
diff --git a/packages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts b/packages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts
index b7eff77e35..c53aa33408 100644
--- a/packages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts
+++ b/packages/core/src/hooks/__tests__/MenuPressShadowRoot.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file MenuPressShadowRoot.a11y.chromium.spec.ts
diff --git a/packages/core/src/reset.a11y.chromium.spec.ts b/packages/core/src/reset.a11y.chromium.spec.ts
index 31bc60fe5d..8b16c993f0 100644
--- a/packages/core/src/reset.a11y.chromium.spec.ts
+++ b/packages/core/src/reset.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file reset.a11y.chromium.spec.ts
diff --git a/packages/core/src/reset.until-found.a11y.browser.spec.ts b/packages/core/src/reset.until-found.a11y.browser.spec.ts
index 986af19cfe..67de2a2270 100644
--- a/packages/core/src/reset.until-found.a11y.browser.spec.ts
+++ b/packages/core/src/reset.until-found.a11y.browser.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file reset.until-found.a11y.browser.spec.ts
diff --git a/packages/core/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts b/packages/core/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts
index ca88921f0e..25683611c3 100644
--- a/packages/core/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts
+++ b/packages/core/src/theme/__tests__/SpacingRootFontSize.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file SpacingRootFontSize.a11y.chromium.spec.ts
diff --git a/packages/lab/src/Chat/__tests__/ChatTypingIndicator.a11y.chromium.spec.ts b/packages/lab/src/Chat/__tests__/ChatTypingIndicator.a11y.chromium.spec.ts
index 418cd70ca7..5108d6baf2 100644
--- a/packages/lab/src/Chat/__tests__/ChatTypingIndicator.a11y.chromium.spec.ts
+++ b/packages/lab/src/Chat/__tests__/ChatTypingIndicator.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/** Real-browser and accessibility-tree binding for ChatTypingIndicator. */
diff --git a/packages/lab/src/CircularProgress/__tests__/CircularProgress.a11y.chromium.spec.ts b/packages/lab/src/CircularProgress/__tests__/CircularProgress.a11y.chromium.spec.ts
index c274917760..ee48b38c0e 100644
--- a/packages/lab/src/CircularProgress/__tests__/CircularProgress.a11y.chromium.spec.ts
+++ b/packages/lab/src/CircularProgress/__tests__/CircularProgress.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope ^(internal/a11y-spec/src/patterns/progressbar\.|packages/core/src/ProgressBar/|packages/lab/src/CircularProgress/|apps/storybook/stories/ProgressbarA11y)
/**
* @file CircularProgress.a11y.chromium.spec.ts
diff --git a/packages/lab/src/__tests__/ReorderGripPinchZoom.a11y.chromium.spec.ts b/packages/lab/src/__tests__/ReorderGripPinchZoom.a11y.chromium.spec.ts
index 32de4fe463..02e5ae63aa 100644
--- a/packages/lab/src/__tests__/ReorderGripPinchZoom.a11y.chromium.spec.ts
+++ b/packages/lab/src/__tests__/ReorderGripPinchZoom.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y always
/**
* @file ReorderGripPinchZoom.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts
index 1e149afac8..6ab7b00e13 100644
--- a/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/MarkdownParitySandbox.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope core/Markdown richtext/* ^(apps/storybook/stories/RichTextEditor\.(markdownParity|stories)|packages/richtext/src/__tests__/(MarkdownParitySandbox|RichTextView|RichTextEditorToolbar)) ^packages/richtext/
/**
* @file MarkdownParitySandbox.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts
index 2624c623ac..b0635e596c 100644
--- a/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/MarkdownPlugins.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MarkdownPlugins.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts
index d49a367477..bd9c462a3d 100644
--- a/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/MarkdownPluginsImportExport.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file MarkdownPluginsImportExport.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts
index 19267209aa..f99482ee5b 100644
--- a/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/Playground.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file Playground.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts
index 3570469717..56728a517e 100644
--- a/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/RichTextEditorToolbar.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope core/Markdown richtext/* ^(apps/storybook/stories/RichTextEditor\.(markdownParity|stories)|packages/richtext/src/__tests__/(MarkdownParitySandbox|RichTextView|RichTextEditorToolbar)) ^packages/richtext/
/**
* @file RichTextEditorToolbar.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts
index 0b13cdd778..11edd4634d 100644
--- a/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/RichTextView.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y scope core/Markdown richtext/* ^(apps/storybook/stories/RichTextEditor\.(markdownParity|stories)|packages/richtext/src/__tests__/(MarkdownParitySandbox|RichTextView|RichTextEditorToolbar)) ^packages/richtext/
/**
* @file RichTextView.a11y.chromium.spec.ts
diff --git a/packages/richtext/src/__tests__/TableCellSelection.a11y.chromium.spec.ts b/packages/richtext/src/__tests__/TableCellSelection.a11y.chromium.spec.ts
index 75fed698d9..7f949a311f 100644
--- a/packages/richtext/src/__tests__/TableCellSelection.a11y.chromium.spec.ts
+++ b/packages/richtext/src/__tests__/TableCellSelection.a11y.chromium.spec.ts
@@ -1,4 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @pr-a11y release-only
/**
* @file TableCellSelection.a11y.chromium.spec.ts
diff --git a/playwright.config.ts b/playwright.config.ts
index ef8cb60efc..01bf7cb32e 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -25,7 +25,12 @@
* Cross-browser specs use `.a11y.browser.spec.ts`; Chromium-only contracts keep
* `.a11y.chromium.spec.ts`. The WebKit project runs only the former.
*
- * SYNC: When a package gains an accessibility binding, add its spec glob here.
+ * Pull requests run a scoped selection of the same files with
+ * `pnpm test:a11y-contract:pr`; each spec's `@pr-a11y` header lines decide when
+ * (`.github/scripts/a11y-pr-contracts.mjs`). A new spec needs no workflow edit.
+ *
+ * SYNC: When a package gains an accessibility binding outside these globs, add
+ * its glob here and in `.github/scripts/a11y-pr-contracts.test.mjs`.
*/
import {defineConfig, devices} from '@playwright/test';