Skip to content

docs(architecture): form controls get a border role held at 3:1 - #11631

Merged
cixzhang merged 4 commits into
mainfrom
specs/color-border-control
Nov 14, 2026
Merged

cixzhang merged 4 commits into
mainfrom
specs/color-border-control

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Records the owner's decision of 2026-11-13 ("New control-border role"): form controls get their own border role, --color-border-control, held at 3:1 against the surface and the page body in light and dark mode.

What changes for people: text fields, selects and other field shells, and checkbox and radio boxes, get an edge people can see (today it is 1.5:1 in default light and 1.9:1 in dark, under the 3:1 WCAG 2.2 SC 1.4.11 asks). Cards, dividers and everything else keep their lighter edge.

Records: architecture:theme-tokens gains INV13 and DEC-2, and INV10's role list names control. The build (the token default, each theme template's value, and the components that use it) follows in its own pull request.

New public API: one theme token, --color-border-control.

Records only: no code, no changeset.

Writing rubric results

  • R1 narration: none; present tense about the system.
  • R2 research: none in the record; the measurement lives in the decision's linked artifact.
  • R3 evidence: the owner's chosen wording is quoted; no card or pull request is cited in the record.
  • R4 rejected alternatives: two, one line each.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none; the record states the rule, not what is built.

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 14, 2026 1:05am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 13, 2026
@astracat-bot

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 14, 2026, 1:58 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec aecbafc

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the approved direction, a --color-border-control role held at 3:1 for field shells and checkbox and radio boxes, stands, but the record needs two edits first.

  • INV13 binds only Core's defaults and the theme templates, so themes built from a colour scale (expandColorScale()), which today hold their form-control edge at 3:1 against their own surface (4.38:1 light and 3.82:1 dark under contrast: 'high'), get no generated --color-border-control, and DEC-2's "darkens only the controls" does not hold for them; state what those themes get and scope DEC-2's sentence.
  • The INV13 verification row in docs/architecture/theme-tokens.md stops after Evidence, so add its failure signal, for example "--color-border-control falls below 3:1 against the surface or the page body in light or dark mode".

Also worth a look: add INV13 to the record's tokens review-applicability list, and name the themes INV13 binds the way INV11 does. A new commit needs a fresh /approve-spec for its head.

Claims and files checked
  • Form controls get their own border role held at 3:1 against the surface and the page body in light and dark: verified (INV13, DEC-2).
  • Today's field edge is 1.5:1 in default light and 1.9:1 in dark: verified against the default surface (1.51:1 and 1.93:1 for --color-border-emphasized, which field shells and checkbox and radio boxes paint).
  • Cards, dividers and everything else keep their lighter edge: verified for Core's defaults and the theme templates; does not hold for colour-scale themes (first finding).
  • The record gains INV13 and DEC-2, and INV10's role list names control: verified.
  • One new public theme token, --color-border-control: verified as the token the record decides; no package surface changes in this pull request.
  • Records only, no code or changeset, with the build to follow separately: verified (one record file changed).
  • Writing rubric R1 to R7: verified (no narration, research, change references, open questions or project status; two one-line rejected alternatives inside DEC-2).
  • docs/architecture/theme-tokens.md: the two findings above and two non-blocking notes.

Automated review (maintainer link)

Comment thread docs/architecture/theme-tokens.md Resolved
Comment thread docs/architecture/theme-tokens.md Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 656cbe2

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the approved direction, a --color-border-control role held at 3:1 for field shells and checkbox and radio boxes, stands, and the colour-scale and failure-signal gaps from the last round are filled, but the new colour-scale sentences need one correction.

  • INV13 and DEC-2 say a theme built from a colour scale already holds its control edge at 3:1 against its surface and body, but the generator bumps that edge against the surface only, so in light mode at standard contrast it is 2.71:1 to 2.81:1 against the page body; following DEC-2 ("its controls keep the edge they have") would break INV13, so state that the generated --color-border-control meets 3:1 against both surface and body (keeping the high-contrast start) and reword DEC-2 to match, or narrow INV13 and its verification row if the surface alone is meant.

Also worth a look: cite architecture:theme-authoring-contract for the colour-scale rule (this record says it does not own generated scales), add INV13 to the record's tokens review-applicability list, and name the themes INV13 binds the way INV11 does. A new commit needs a fresh /approve-spec for its head.

Claims and files checked
  • Form controls get their own border role held at 3:1 against the surface and the page body in light and dark: verified (INV13, DEC-2).
  • Today's field edge is 1.5:1 in default light and 1.9:1 in dark: verified against the default surface (1.51:1 and 1.93:1).
  • Field shells and checkbox and radio boxes take the new edge, while cards, dividers and everything else keep the lighter one: verified (DEC-2).
  • The record gains INV13 and DEC-2, and INV10's role list names control: verified.
  • One new public theme token, --color-border-control: verified as the token the record decides; no package surface changes in this pull request.
  • Records only, no code or changeset, with the build in its own pull request: verified for this pull request (one record file changed).
  • Writing rubric R1 to R7: verified (no narration, research, change references, open questions or project status; two one-line rejected alternatives inside DEC-2).
  • docs/architecture/theme-tokens.md: the finding above and three non-blocking notes.

Automated review (maintainer link)

Comment thread docs/architecture/theme-tokens.md Resolved
Comment thread docs/architecture/theme-tokens.md Resolved
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · d77a550

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 5b9d8cf

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the approved direction, a --color-border-control role held at 3:1 for field shells and checkbox and radio boxes, stands, and the colour-scale sentences now agree with each other, but one sentence in DEC-2 still needs a fix.

  • Miss: DEC-2 says cards, dividers and every other surface keep the lighter --color-border-emphasized edge, but the Card and Divider component records give the default Card and the default subtle Divider a --color-border edge, so the records would disagree; "keep their own lighter edge (--color-border or --color-border-emphasized)" fixes it.

Also worth a look: cite architecture:theme-authoring-contract for the colour-scale rule, add INV13 to the record's tokens review-applicability list, and name the themes INV13 binds the way INV11 does. A new commit needs a fresh /approve-spec for its head.

Claims and files checked
  • Form controls get their own border role held at 3:1 against the surface and the page body in light and dark: verified (INV13, DEC-2).
  • Today's control edge is 1.5:1 in default light and 1.9:1 in dark: verified against the default surface (1.51:1 and 1.93:1).
  • Field shells and checkbox and radio boxes take the new edge, while cards, dividers and everything else keep their lighter edge: verified as the description states it; DEC-2's wording names the wrong token for cards and dividers (the finding above).
  • The record gains INV13 and DEC-2, and INV10's role list names control: verified.
  • One new public theme token, --color-border-control: verified as the token the record decides; no package surface changes in this pull request.
  • Records only, no code or changeset, with the build in its own pull request: verified for this pull request (one record file changed).
  • Writing rubric R1 to R7: verified (no narration, research, change references, open questions or project status; two one-line rejected alternatives inside DEC-2).
  • docs/architecture/theme-tokens.md: the finding above and four non-blocking notes.

Automated review (maintainer link)

Comment thread docs/architecture/theme-tokens.md Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d77a550

@cixzhang

Copy link
Copy Markdown
Contributor Author

Decision: D-20261114-022

Records the owner's decision of 2026-11-13 that form controls get their own border role, --color-border-control, held at 3:1 against the surface and the page body in Core, every theme template and colour-scale themes; other borders keep their own lighter role. Records only; the token and its use follow in their own pull request.

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the --color-border-control role, held at 3:1 against the surface and the page body for field shells and checkbox and radio boxes, is recorded with an engineering owner's approval for this head, and it agrees with the Card and Divider records on their edges. Lint, typecheck, build and docsite-test passed on this head; the test suite was still running, and the merge guard waits for it.

Optional follow-ups, none blocking:

  • INV13's and DEC-2's "other borders keep their own lighter roles (--color-border or --color-border-emphasized)" leaves out status borders, the checked box's accent edge and SelectableCard's selection border; "such as --color-border, --color-border-emphasized, a status border (INV11) or a selection edge" covers them.
  • The INV13 verification row names a contrast.test.ts case for the control edge that the file does not have at this head; an "Evidence gap:" note on the row keeps it honest until the build adds the test.
  • Cite architecture:theme-authoring-contract for the colour-scale rule, add INV13 to the record's tokens review-applicability list, and name the bound themes as INV11 does ("Astryx's first-party themes"); the build also has to amend the Indicator, Y2K and Swift TextInput records that still name the emphasized border for these controls.
Claims and files checked
  • Form controls get their own border role, held at 3:1 against the surface and the page body in light and dark: verified (INV13, DEC-2).
  • Today's control edge is about 1.5:1 in default light and 1.9:1 in dark: verified against the default surface (1.51:1 and 1.93:1).
  • Field shells and checkbox and radio boxes take the new edge, while cards, dividers and everything else keep their lighter edge: verified for cards and dividers, matching the Card and Divider records; status, checked and selection edges sit outside the stated list (first follow-up above).
  • The record gains INV13 and DEC-2, and INV10's role list names control: verified.
  • One new public theme token, --color-border-control: verified as the token the record decides; no package surface changes in this pull request.
  • Records only, no code and no changeset, with the build in its own pull request: verified for this pull request (one record file changed).
  • Writing rubric R1 to R7: verified (no narration, research, change references, open questions or project status; two one-line rejected alternatives inside DEC-2; the owner's wording quoted).
  • docs/architecture/theme-tokens.md: no blocking finding; the follow-ups above.

Automated review (maintainer link)

Comment on lines +219 to +220
(`spec:AST-020` FR1; WCAG 2.2 SC 1.4.11). Other borders keep their own
lighter roles (`--color-border` or `--color-border-emphasized`) (DEC-2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: read literally, this lists every other border, but status borders are neither of these. INV11 holds --color-border-<status> at 3:1 or more, and a field shell in a warning, error or success state paints it today (packages/core/src/Field/inputStyles.stylex.ts:102-122). INV11 still governs them, but a build author has to infer that a field in a status state keeps its status edge. Suggested:

  (`spec:AST-020` FR1; WCAG 2.2 SC 1.4.11). Other borders keep their own
  roles, such as `--color-border`, `--color-border-emphasized` or a status
  border (INV11) (DEC-2).

@cixzhang
cixzhang marked this pull request as draft November 14, 2026 01:37
@cixzhang
cixzhang marked this pull request as ready for review November 14, 2026 01:37
@cixzhang
cixzhang merged commit 7866b20 into main Nov 14, 2026
124 of 127 checks passed
@github-actions
github-actions Bot deleted the specs/color-border-control branch November 14, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — d77a5505 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant