Repository navigation
fix(site/src/pages/TemplateBuilder): use shared Checkbox in ModuleCard - #30540
Merged
Merged
Conversation
Add border-control and border-control-hover color tokens and use them for the resting and hover borders of the shared Checkbox and RadioGroupItem components. The previous borders (border-default and border-secondary) fell below the 3:1 non-text contrast required by WCAG 1.4.11. border-control is zinc-500 in both themes. border-control-hover is zinc-400 in dark mode and zinc-600 in light mode.
The module card drew its own checkbox with a border-secondary border, which failed the 3:1 non-text contrast ratio. It now renders the shared Checkbox, so it picks up the border-control tokens, hover and focus styles. The card is no longer itself a role=checkbox, which removes the nested View details link from inside the control, and clicking that link no longer toggles the selection.
…ange Let the checkbox's clicks bubble to the card's existing onClick instead of adding a change handler and a click guard, and leave the details link behavior unchanged.
aqandrew
approved these changes
Oct 30, 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.
The template builder's module cards drew their own checkbox with a
border-secondaryborder. That border is 1.70:1 against the card in dark mode and 2.33:1 in light mode, below the 3:1 non-text contrast that WCAG 1.4.11 requires. The cards now use the sharedCheckbox, so they get theborder-controltokens from #30462 (3.67:1 dark, 4.40:1 light, measured on the card'ssurface-secondarybackground), plus the shared hover and focus styles.The card itself is no longer a
role="checkbox", so the real checkbox is the only control, labelled by the module name. The checkbox has no change handler of its own. Its clicks, including Space, bubble up to the card's existingonClick, so clicking anywhere on the card still toggles it.Stacked on #30462, which adds the
border-controltokens. Retarget tomainonce that merges.Fixes DEQ-148
Before and after
Captured from the
ModuleCardstories. I also checked clicking the checkbox, pressing Space on it, and clicking the card on the Modules step of the running app.Decision log
Checkboxinstead of only swapping the token. Changingborder-border-secondarytoborder-border-controlon the hand-drawn box would fix the contrast in one line, but the box would still miss futureCheckboxchanges and have no hover or focus state.div. Putting the Radix checkbox (a<button>) inside arole="checkbox"card would give two tab stops for one choice. The card click is a mouse shortcut. Keyboard users tab to the checkbox, and theclick-events-have-key-eventsexception says so, following the pattern inInputGroupAddon.onCheckedChange. Letting the checkbox's click bubble to the card keeps the card'sonClickunchanged and avoids a double toggle without extra guards.TemplateCarddraws its radio by hand in the same way. Both can follow up separately.Generated by Coder Agents on behalf of @chrifro.