/storefront-next:sfnext-accessibilityfrom storefront-next
Builds and fixes WCAG 2.1 AA accessible UI in Storefront Next: jsx-a11y lint findings, accessible names, form error association, dialog focus management, aria-live messages, keyboard behavior, color contrast, and Storybook a11y/play() plus e2e axe baseline verification.
Ships in storefront-next. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Target: WCAG 2.1 AA. Accessibility is checked at three levels, cheapest first:
| Level | Tool | Catches |
|---|---|---|
| Lint | OxLint jsx-a11y (pnpm lint, pnpm lint:a11y) | Missing alt/labels, invalid ARIA, non-interactive handlers, ambiguous link text |
| Component | Storybook a11y addon (axe) and play() assertions | Contrast and name/role issues in a rendered state; focus, live regions, dialog behavior |
| Page | e2e axe scan (pnpm a11y) against e2e/a11y-baseline.json | Page composition, layout, mobile vs desktop |
Some things no scanner finds: focus order, meaning carried by color alone, 200%/400% zoom reflow, and what a screen reader actually announces. Those need keyboard testing, a story play() assertion of the DOM facts behind them, or a human with assistive technology.
src/components/ui/ (dialog, dropdown-menu, sheet, tooltip, ...).FormLabel/FormControl/FormMessage from @/components/ui/form and the wrappers in src/components/form-fields/ (they wire aria-describedby and invalid state from form context).src/components/product-image and src/components/dynamic-image (alt text), src/components/radio-card (grouped options), src/components/skip-link.tsx (first focusable element, targets #main-content), src/components/announcement-banner.<Button aria-label={t('close')}>. Decorative icons get aria-hidden="true" and must not be focusable.button, a, ul, h1..h6); add ARIA only to fill gaps. Keep one h1 per page and do not skip levels.aria-live region (role="status" or role="alert"); the message must be rendered into an existing live region or the region must exist before content changes.Escape closes. Use the Radix dialog primitives rather than hand-rolling.prefers-reduced-motion (see src/components/fade-through-image and product-zoom-modal for the pattern).role="list" on a ul: it is deliberate (Tailwind's list-style: none removes list semantics in Safari + VoiceOver), and the lint config allows it.Before editing a shared primitive, check the call site.
aria-label, a meaningless alt, or bypassed FormLabel. Fix the caller.Do not call something fixed from reading code. Capture a failing signal first, then the same check passing afterwards.
pnpm lint:a11y.STORYBOOK_A11Y_TEST_MODE=error via pnpm storybook:test --type=a11y, or add the scenario to the e2e a11y specs.play() assertion (next section) and watch it fail.pnpm storybook:test --type=snapshot, --update only after reviewing the diff) and pnpm lint.oxlint-disable, aria-hidden) just to turn a check green. A suppression is acceptable only when it targets a node you do not control and the reason is written next to it.todo (violations are shown, not failing). pnpm storybook:test --type=a11y runs in error mode, so violations fail. STORYBOOK_DISABLE_A11Y=true turns it off.{ a11y: { test: 'error' } } into parameters (see src/components/checkout/storybook/checkout-strict-a11y-parameters.ts).skip-a11y excludes a story from a11y runs. Use it rarely and comment why.play: async ({ canvasElement }) => {
await waitForStorybookReady(canvasElement);
const body = within(canvasElement.ownerDocument.body); // Radix portals render into <body>
const dialog = body.getByRole('dialog');
await expect(dialog).toBeInTheDocument();
await expect(body.getAllByRole('textbox')[0]).toHaveFocus();
await expect(body.getByRole('textbox', { name: /email/i })).toBeInTheDocument(); // label association
await expect(body.getByRole('status')).toHaveTextContent(/saved/i); // live region populated
},
A working reference is src/components/login/stories/otp-modal.stories.tsx. Imports: expect, within, userEvent from storybook/test; waitForStorybookReady from @storybook/test-utils. Tag the story interaction so it runs under --type=interaction.
pnpm a11y runs axe (WCAG 2.1 A/AA tags) over key pages at desktop and mobile viewports and compares with e2e/a11y-baseline.json. CI fails when critical or serious violations increase or a new critical/serious rule appears; moderate and minor regressions are logged but do not block.
pnpm a11y # scan and compare with baseline
pnpm --dir e2e a11y:report # or from e2e/: markdown + HTML report of violations
pnpm --dir e2e a11y:update-baseline # after fixing: ratchet the baseline down, review the diff, commit
pnpm a11y:scan-coverage # checks that every page route is scanned or explicitly allowlisted
Scenario in e2e/src/specs/core/a11y/ (public, account or orders spec), then run a11y:update-baseline. Details: e2e/docs/a11y.md.pnpm dev) or use --mode=local as described in storefront-next:sfnext-testing.jsx-a11y/anchor-ambiguous-text only sees literal JSX text. A link whose text comes from t('...') is never checked, so review link and label copy in src/locales/*/translations.json for "click here"/"read more" style text, in every locale you ship. See storefront-next:sfnext-i18n.
More checklists (states, keyboard, pages to spot check): references/checklist.md.
storefront-next:sfnext-quality-gates - lint config and pre-PR checkliststorefront-next:sfnext-testing - story, unit and e2e test mechanicsstorefront-next:sfnext-components - component and form-field conventionsstorefront-next:sfnext-theming - color tokens and contraststorefront-next:sfnext-i18n - translated labels and link textWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin storefront-next25 skills in this plugin
/sfnext-analytics-consentStorefront Next analytics: engagement adapters (Einstein, Active Data, Data 360), adding a custom adapter, tracking consent gating, PageViewTracker, useAnalytics events, and first-touch attribution (dw_attribution). Use when configuring engagement.adapters in config.server.ts, writing an adapter with hasConsent, registering it in initializeEngagementAdapters, wiring the consent banner (trackingConsent, consentCategories, dw_dnt), firing trackViewProduct/trackCartItemAdd events, debugging why no analytics events are sent, or passing campaign attribution to orders. Do not use for general config loading or env vars (use `storefront-next:sfnext-configuration`), CSP/script allowlisting of third-party tags (use `storefront-next:sfnext-security`), or SEO meta/JSON-LD (use `storefront-next:sfnext-seo`)./sfnext-authenticationWork with Storefront Next's server-only authentication and session architecture (SLAS guest/registered tokens, httpOnly cookies, auth.server.ts middleware). Use for getAuth, useAuth, updateAuth, destroyAuth, protecting account routes, login/logout actions, guest-to-registered basket/wishlist merge, "session expired" redirects, 401 recovery loops, cc-at/cc-nx/usid/dwsid cookies, cookie names or expiry, passwordless login, social login, OTP email verification, passkeys, guest order lookup, or refresh-token lifetime settings. Do not use for Turnstile, CSP headers or cookie-domain config (use `storefront-next:sfnext-security`), calling SCAPI clients (use `storefront-next:sfnext-scapi`), or sharing sessions with SFRA (use `storefront-next:sfnext-hybrid-storefronts`).Other plugins' skills for the same job