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
Draft
fix(atomic): enable a11y checks and scope axe to WCAG 2.2 AA#7134y-lakhdar wants to merge 1 commit intofeat/a11y-scriptsfrom
y-lakhdar wants to merge 1 commit intofeat/a11y-scriptsfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning this PR will make Storybook test fail because of unfixed accessibility remaining issues
Summary
globals.a11y.manual = truefrom the Storybook preview default export, which was preventing@storybook/addon-a11yfrom running axe checks during vitest storybook tests. The addon'safterEachhook skips execution whena11yGlobals?.manual === true.options.runOnlytoparameters.a11yto scope axe-core to WCAG 2.2 AA rules only (wcag2a,wcag21a,wcag2aa,wcag21aa,wcag22aa).Context
The
globals.a11y.manualsetting was added in6751e865to disable automatic a11y panel checks in the Storybook UI. Later,8178da13addedparameters.a11y.test = 'error'to enable a11y checking via vitest, but themanualglobal was never removed. Since the addon checksmanualfirst, no axe checks were running and theVitestA11yReporterhad nothing to capture.