Repository navigation
Description
Summary
An unchecked checkbox is drawn with a 1px outline that is about 1.2:1 against a light page. WCAG 2.1 SC 1.4.11 (Non-text Contrast, level AA) asks 3:1 for the parts of a control a person needs in order to identify it, and the repo's contract is "WCAG 2.1 AA … AA contrast" (AGENTS.md, non-negotiable boundaries). The radio beside it on the same page is 17:1. This is a design-system choice, not a defect on one page, so this issue lays out the evidence and the options and leaves the choice open.
Found while reviewing the coding-agent consent page (the Also allow group), where the three checkboxes are the only way to see that those choices exist.
What the repo says today (main c62118c)
| Control | Outline token | Where |
|---|---|---|
| Checkbox | border-border, which is --color-border: hsl(var(--border)) (globals.css:138); --border is 240 5.9% 90% in light (:247) and 0 0% 24% in dark (:394) |
packages/ui/src/components/forms/checkbox.tsx:87 |
| Radio | border-primary |
radio-group.tsx:137 |
| Switch, unchecked | border-border-strong (#d1d5db) |
switch.tsx:73-76, with a comment that the track alone is ~1.2:1 |
| Input, Textarea, Select | --color-border-input, which is --color-border-strong (#d1d5db) in light mode |
globals.css:74-79; input.tsx:33, textarea.tsx:152, select.tsx:64 |
Dark mode, the --color-border-* family |
base #404040, strong #525252, input = base |
globals.css:356-359 |
globals.css:76-78 says the base border "is barely perceptible (~1.2:1)" on a white field, "so inputs use a stronger border". The stronger token is #d1d5db, which is 1.47:1 on white, so the stated aim was "more visible", not 3:1. The checkbox does not use even that token.
What was observed
Measured in a real browser with getComputedStyle on /oauth/consent (light theme, page background rgb(252,252,252)):
| Element | Outline | Contrast vs page |
|---|---|---|
| Unchecked checkbox (×3, "Also allow") | rgb(228,228,231), 1px |
1.24:1 |
| Radio | rgb(24,24,27) / selected rgb(3,7,18), 1px |
17.27:1 / 19.63:1 |
Computed from the tokens, on white: #e5e7eb 1.24, #d1d5db 1.47, gray-400 #9ca3af 2.54, gray-500 #6b7280 4.83. In dark mode the checkbox's hsl(0 0% 24%) outline on #0a0a0a is 1.8:1, #404040 is 1.91 and #525252 is 2.53. A checked box fills with the accent colour and is not affected.
Blast radius at that commit: <Checkbox appears in 21 platform files (27 usages) and in 7 packages/ui components (column-builders.tsx row selection for every DataTable, filter-panel.tsx, multi-select.tsx, checkbox-group.tsx, env-var-list-editor.tsx, schedule-editors.tsx, data-table-skeleton-cell.tsx).
Not examined: the focus ring's contrast, the disabled state, other controls' borders (chips, badges, the segmented control), and whether any screen reader or axe rule reports this (axe's 1.4.11 coverage is partial, and the consent page's axe audits pass today).
Constraints a change has to respect
- The label and the box's position are also cues, so a reader can still tell what the control is; the outline is the cue for its state (empty vs checked).
- Inputs, selects and textareas sit beside checkboxes in the same forms and share one family of tokens; a checkbox that is much darker than the fields next to it changes how every form looks.
- The Switch already received an outline for the same reason (its comment), so the system has precedent for strengthening one control's edge.
- The tokens live in
@tale/ui'sglobals.css, which the docs site imports as it is (services/docs/app/globals.css:1).
Options (no stated preference)
- Checkbox only → the radio's outline (
border-primary). Matches the radio next to it; heavier than inputs. - Checkbox only → a mid-grey token at 3:1 or more (gray-500 is 4.8:1; gray-400 at 2.5:1 is not enough). Lighter than radios, still distinct from the inputs.
- Raise the light-mode
--color-border-strong/--color-border-inputto 3:1 or more, which moves inputs, selects, textareas and the Switch outline together. - Keep it and record the reasoning in the design-system guide (a boundary that the label and the position already identify), with the exception named.
Questions
- Is 1.4.11 meant to apply to form-control outlines in this design system, or is "visible, not 3:1" the intent behind
globals.css:76-78? - If it applies, should inputs move with the checkbox?
Related
Found in the polish pass over the coding-agent consent page and Connected agents (app/features/auth/components/agent-consent/).
Activity
yannickmonney commentedon Nov 14, 2026
Decision
The rule: WCAG 2.1 SC 1.4.11 (Non-text Contrast) applies to the boundary of every form control in
@tale/ui. That covers checkbox, radio, the switch track, input, select and textarea, plus any hand-rolled indicator or field that draws one of these controls. An unchecked or empty control's edge must reach at least 3:1 against every surface a form sits on, in both themes. Disabled controls are exempt, as 1.4.11 allows, and keep their opacity treatment. Incidental borders (cards, dividers, tables, popover section rules,--color-border-base,--border) are not covered and do not change.How: one shared control-boundary token, the existing
--color-border-input, is raised:#80858f. That is 3.70:1 on white, 3.54:1 on bg-elevated and 3.37:1 on--muted.#7a7a7a, its own value rather than an alias ofborder-base. That is 4.61:1 on the page, 4.18:1 on card, 3.53:1 on muted and 3.28:1 on--accent.The unchecked checkbox, the unchecked radio, the unchecked Switch outline, searchable-select's radio indicator and switcher search field, and filter-panel's radio all move to this token. The Switch outline now also shows in dark mode. Checked and indeterminate states keep the accent. The guard test is the normative spec: the token must be at least 3:1 against bg-base, bg-elevated, bg-muted,
--background,--card,--popover,--input,--sidebar,--mutedand--accentin both themes. The hex values are just what passes it today.Answers
globals.css:76-78fell short of 3:1 and was never a recorded exception.Rationale
At 1.24:1 (1.8:1 dark), the checkbox fails AA on 27 platform usages and on every DataTable row, and searchable-select's own radio indicator fails the same way. Fixing only the checkbox would leave inputs and dark controls under 3:1 and make the box heavier than the fields beside it. Recording an exception would document a known violation. One raised token, applied to the primitives and to the hand-rolled copies, fixes the whole family with one value per theme. The guard keeps it from drifting back.
Implementation units
main, S)globals.css, with the comments rewritten to state the rule.globals.test.tschecks the token against the ten surfaces in both themes.design/docs/tokens.mdand the ui-docs colors and accessibility foundations. The colors.md note about the old aliasing is rewritten.main, S; depends on 1)checkbox.tsx,radio-group.tsx,switch.tsx, the radio indicator and switcher search field insearchable-select.tsx, the radio infilter-panel.tsx, and a sweep for other hand-rolled indicators and caller overrides.services/ui-docs/tests/manual/suites/or a row in itsreference/automation.md.