fix(site/src): repair two stories broken by a11y-name drift - #28868
Merged
Conversation
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.
untra
approved these changes
Sep 1, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 anaria-labelonto 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 querygetByRole("link", { name: "Learn more" })no longer matches anything.LicenseBannerView > Three Warnings: the generic-collapse refactor (fix: move<LicenseBannerView />to generic collapse #28831) rendersCollapsibleTrigger'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'sgetByRole("button", { name: /show more/i })rejects as ambiguous.TrialRequestForm > Submits Complete Form(flaky, deterministic on newermain): the story's select helper races radix's asynchronousaria-hiddenunmarking 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
selectOption.asChildon the collapse trigger so it decorates the existingButtoninstead 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-jsrunsvitest --project=unit, and the CI Storybook job does pixel snapshots (and fails on dependabot PRs for the unrelated reason thatPIXEL_KEYis 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 onmaintip (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-pushsuite (3,545 story tests) passes locally with these two fixes.Generated with
mux• Model:anthropic:claude-fable-5• Thinking:xhigh