Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site/src): repair two stories broken by a11y-name drift - #28868

Merged
ThomasK33 merged 1 commit into
mainfrom
fix-storybook-a11y-names
Sep 1, 2026
Merged

fix(site/src): repair two stories broken by a11y-name drift#28868
ThomasK33 merged 1 commit into
mainfrom
fix-storybook-a11y-names

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Repairs three Storybook interaction tests that are deterministically broken on main, blocking every branch whose author runs the opt-in full pre-push hook (make test-storybook).

What broke

  • TrialRequestForm > Keyboard Navigation: the biome 2.4.10 → 2.5.10 bump (chore: bump @biomejs/biome from 2.4.10 to 2.5.10 in /site #28120) autofixed an aria-label onto the premium trial form's "Learn more" docs link. The accessible name of the link is now the aria-label, so the story's exact-name query getByRole("link", { name: "Learn more" }) no longer matches anything.

  • LicenseBannerView > Three Warnings: the generic-collapse refactor (fix: move <LicenseBannerView /> to generic collapse #28831) renders CollapsibleTrigger's own <button> around the <Button> child — invalid HTML (nested buttons) and two identically named "Show more" buttons in the accessibility tree, which the story's getByRole("button", { name: /show more/i }) rejects as ambiguous.

  • TrialRequestForm > Submits Complete Form (flaky, deterministic on newer main): the story's select helper races radix's asynchronous aria-hidden unmarking after an option click closes the listbox, so the next role query can see a page with no accessible roles. The helper now waits for the combobox to be accessible again.

Fixes

  • Query the link by its real accessible name (the aria-label).
  • Wait for the combobox to regain accessibility after selectOption.
  • asChild on the collapse trigger so it decorates the existing Button instead of nesting one, and merge the trigger's className onto the Button. This also removes the React "button cannot be a descendant of button" hydration warning the story logs today.

Why CI did not catch it

The storybook interaction project only runs locally: test-js runs vitest --project=unit, and the CI Storybook job does pixel snapshots (and fails on dependabot PRs for the unrelated reason that PIXEL_KEY is unavailable to them). The full interaction suite runs in the opt-in pre-push hook, where these two failures block any push. Filed #28869 for the CI gap and for three further stories the newest dependency-bump wave broke on main tip (this branch is anchored just before that wave so its full local suite runs green; rebase after those are fixed).

Validation: both story files green in isolation, and the full make pre-push suite (3,545 story tests) passes locally with these two fixes.


Generated with mux • Model: anthropic:claude-fable-5 • Thinking: xhigh

The biome 2.5.10 autofix added an aria-label to the premium trial form's
docs link, changing its accessible name out from under the Keyboard
Navigation story's exact-name query, and the license banner's collapse
trigger rendered its own button around Button (invalid HTML, two
identically named buttons in the accessibility tree). Use asChild on the
trigger and query the link by its aria-label.
@ThomasK33
ThomasK33 merged commit b5c49e1 into main Sep 1, 2026
48 of 49 checks passed
@ThomasK33
ThomasK33 deleted the fix-storybook-a11y-names branch September 1, 2026 12:12
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants