Skip to content

fix(atomic): enable a11y checks and scope axe to WCAG 2.2 AA#7134

Draft
y-lakhdar wants to merge 1 commit intofeat/a11y-scriptsfrom
fix/a11y-enable-wcag-checks
Draft

fix(atomic): enable a11y checks and scope axe to WCAG 2.2 AA#7134
y-lakhdar wants to merge 1 commit intofeat/a11y-scriptsfrom
fix/a11y-enable-wcag-checks

Conversation

@y-lakhdar
Copy link
Contributor

@y-lakhdar y-lakhdar commented Feb 16, 2026

Warning this PR will make Storybook test fail because of unfixed accessibility remaining issues

Summary

  • Remove globals.a11y.manual = true from the Storybook preview default export, which was preventing @storybook/addon-a11y from running axe checks during vitest storybook tests. The addon's afterEach hook skips execution when a11yGlobals?.manual === true.
  • Add options.runOnly to parameters.a11y to scope axe-core to WCAG 2.2 AA rules only (wcag2a, wcag21a, wcag2aa, wcag21aa, wcag22aa).

Context

The globals.a11y.manual setting was added in 6751e865 to disable automatic a11y panel checks in the Storybook UI. Later, 8178da13 added parameters.a11y.test = 'error' to enable a11y checking via vitest, but the manual global was never removed. Since the addon checks manual first, no axe checks were running and the VitestA11yReporter had nothing to capture.

Remove globals.a11y.manual which was preventing addon-a11y from running
axe checks during vitest storybook tests. Configure axe-core to run only
WCAG 2.2 AA rules via runOnly tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant