Skip to content

AA contrast: dark text on orange fills, darker orange text (was 2.29:1) - #3

Merged
secsovereign merged 3 commits into
mainfrom
fix/orange-button-contrast
Nov 19, 2026
Merged

secsovereign merged 3 commits into
mainfrom
fix/orange-button-contrast

Conversation

@secsovereign

@secsovereign secsovereign commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Fixes the cross-site contrast item from UI UX's audit (README item 1, btcdecoded-website P1): white text on Bitcoin orange #f7931a is 2.29:1, which fails WCAG AA 4.5:1. That pair is on the checkout CTAs ("Start trial", "Continue with GitHub" on /subscribe and /account) and the secondary buttons. It was reported against plebly.fund in the room, but plebly.fund has no white-on-orange text. The pair lives here (and on the benchmarks page, not touched in this PR).

Change (CSS only)

Two new tokens, following the Commons site's dark-text-on-orange approach. The fill colour is unchanged, so the brand orange stays.

  • --on-orange: #111111. It's now the text colour on every orange fill: .btn-primary, .btn-secondary:hover, .platform-tab.active, .release-badge, .governance-badge, .auth-session__avatar, .book-cover. It's 8.22:1 on #f7931a and 6.80:1 on the #e6820a hover/gradient end.
  • --orange-text-on-light: #a35400. It's now .btn-secondary's text colour. It's 5.45:1 on white and 5.21:1 on the #fff8f0 warm panel; it was 2.29:1 and 2.18:1.

Ratios use the WCAG 2.x relative-luminance formula; they're noted next to the tokens. Applied to components/styles.css (the Next app) and the legacy css/styles.css.

Tests

CSS-only change; the repo has no style tests. I didn't run next build.

Live recheck: on btcdecoded.org/subscribe and /account, "Start trial" and "Continue with GitHub" show dark text on orange. "Continue with Nostr" and "See Intelligence" show darker orange text and turn dark-on-orange on hover. The install page's platform tabs and the release/governance badges show dark text.
Donate: n/a.

@review default scope. @ui UX

Update (ea71508): opt out of Auto Dark

  • color-scheme: only light on html and <meta name="color-scheme" content="only light"> in pages/_document.js. This is Chrome's documented opt-out (Auto Dark Theme blog, Chrome 98, and the CSS Color Adjust spec). With it, the page stays light, so .btn-primary keeps #111 on #f7931a (8.22:1) and .btn-secondary keeps #a35400 (5.45:1 on white).
  • Removed the html.auto-dark { --orange-text-on-light: #f7931a } override from 0ae705c; the opt-out replaces it.
  • Kept the other html.auto-dark rules (logo swap, nav toggle) and the probe in _document.js. Browsers that ignore the opt-out still add the class, and those rules still matter there.
  • next build passes. docs/ was not touched; the Pages workflow rebuilds it.

Headless check: the forced-dark render could not confirm the opt-out. Desktop Chrome 155 with --enable-features=WebContentsForceDark darkens even a minimal two-line page that sets only light in both the meta tag and :root (white rendered as #121212, the same as a page without it). This desktop flag is a user override that ignores the page's opt-out, so this harness can't test it. The opt-out is aimed at Android Chrome's Auto Dark Theme and WebView, which I can't run here. Under that desktop flag only (page still darkened):

  • .btn-primary is computed #111 on #f7931a but renders #ffffff on #f7931a: 2.30:1. Chrome rewrites the label, and no page CSS can stop it.
  • .btn-secondary is computed #a35400 and renders #e08737 on #231f19: 6.0:1, or 6.86:1 on #121212 on /subscribe.

Live recheck: on an Android phone with Chrome's dark theme / Auto Dark on, btcdecoded.org should stay light. "Start trial" shows dark text on orange, and "See plans" shows dark-orange text.

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.

1 participant