Skip to content

fix(a11y): dark-adapt stroke semantic tokens (D12) - #26

Closed
BrianGenisio wants to merge 1 commit into
mainfrom
fix/a11y-d12-stroke-tokens
Closed

fix(a11y): dark-adapt stroke semantic tokens (D12)#26
BrianGenisio wants to merge 1 commit into
mainfrom
fix/a11y-d12-stroke-tokens

Conversation

@BrianGenisio

Copy link
Copy Markdown
Contributor

Summary

Closes #23 ([a11y][D12]). Dark-mode --Colors-Stroke-* tokens no longer copy the light near-white scale, so borders/dividers stop glowing on dark surfaces. Visual change for all DS consumers — please confirm with design-system owners before merge (same process as A7/A8).

Also dark-adapts --Colors-Buttons-Tertiary-Default (the tertiary border color), which stayed Neutral-300 in dark and was the ChatCPT local workaround.

Token changes (dark only; light unchanged)

Token Before (same as light) After
--Colors-Stroke-Background Neutral-20 Neutral-1300
--Colors-Stroke-Lighter Neutral-100 Neutral-1250
--Colors-Stroke-Light Neutral-150 Neutral-1200
--Colors-Stroke-Default Neutral-200 Neutral-1150
--Colors-Stroke-Medium Neutral-300 Neutral-1100
--Colors-Stroke-Strong Neutral-400 Neutral-1000
--Colors-Stroke-Stronger Neutral-550 Neutral-900
--Colors-Stroke-Primary Primary-600 Primary-450
--Colors-Stroke-Primary-Light Primary-350 Primary-500
--Colors-Stroke-Primary-Medium Primary-500 Primary-450
--Colors-Stroke-Primary-Dark Primary-800 Primary-600
--Colors-Buttons-Tertiary-Default Neutral-300 (unchanged in dark) Neutral-1100

Values align with existing dark input/box borders and A7’s Primary-450 focus token. Lighter → Stronger rank is preserved (closer to Main-Top → more contrast).

Notes for consumers

  • After submodule bump, ChatCPT can remove:
    • app.css tertiary border override (--Colors-Buttons-Tertiary-Default)
    • rest-pill darkening if it was only compensating for non-adaptive strokes
  • Components that already hardcode dark borders (e.g. input’s Neutral-1250) are unchanged; semantic Stroke consumers (modal dividers, tables, horizontal-card dashed borders, etc.) will pick this up automatically.

Test plan

  • npm test — 48/48, including new D12 regression in tests/contrast-tokens.spec.js (dark strokes ≠ light near-white; Strong > Default luminance; tertiary border adapts)
  • Design-system owner visual review in dark mode (colors/test.html, modal, table, input, tertiary button)
  • After submodule bump: remove ChatCPT local stroke/tertiary workarounds and spot-check borders

Made with Cursor

Remap dark --Colors-Stroke-* onto dark neutrals/primary so borders
no longer glow near-white on dark surfaces, and dark-adapt the
tertiary button border token consumers were patching locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 01846686-4bf1-4733-b9c1-9c034aedfc36

📥 Commits

Reviewing files that changed from the base of the PR and between c8bc490 and 2771d64.

📒 Files selected for processing (4)
  • colors/README.md
  • colors/colors.css
  • components/button/button.css
  • tests/contrast-tokens.spec.js

📝 Walkthrough

Walkthrough

Dark-mode stroke tokens now map to darker neutral and primary values. The tertiary button border uses a dark neutral token in dark mode. Contrast tests now calculate luminance and verify stroke adaptation, luminance ordering, and tertiary-border behavior. Documentation describes the remapping, semantic stroke-token usage, and expanded contrast coverage.

Mergeability Score: ⚪ Minimal · up to 2771d

This change updates dark-mode stroke and tertiary button tokens with regression coverage; no actionable merge-blocking risk remains beyond normal checks and design review.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements the required token changes and documents consumer impact, but design-system owner sign-off remains pending. Obtain design-system owner visual sign-off and update the linked issue or PR before merge.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the dark-mode stroke-token accessibility fix and references D12.
Description check ✅ Passed The description explains the dark-mode stroke changes, tertiary border update, consumer impact, and test status.
Out of Scope Changes check ✅ Passed All changed files support stroke adaptation, tertiary-border adaptation, documentation, or regression testing; no unrelated changes are shown.

Comment @coderabbitai help to get the list of available commands.

@BrianGenisio

Copy link
Copy Markdown
Contributor Author

I don't like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y][D12] Stroke tokens are not dark-adapted

1 participant