Skip to content

Raise text contrast on filled controls and state labels - #20

Merged
AlteredParadox merged 2 commits into
mainfrom
contrast-fix
Nov 19, 2026
Merged

AlteredParadox merged 2 commits into
mainfrom
contrast-fix

Conversation

@AlteredParadox

@AlteredParadox AlteredParadox commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Addresses the finding fred raised on #18, which was merged and shipped in v0.3.0 before it was read: two colour pairs were under WCAG's 4.5:1 for small text.

What changed

Text Before After
White on primary buttons and the selected settings segment (dark) 3.68:1 on #3b82f6 5.17:1 on #2563eb
Same, on hover (dark) 3.18:1 4.78:1 on #2a6fdb
Primary button hover (light) 4.44:1 6.70:1 on #1d4ed8
Scanning off, status unknown, version string (dark) 2.98:1 in --dim 5.92:1 in --muted
Same (light) 3.09:1 5.76:1
Placeholder text (dark) 3.15:1 in --dim 6.26:1 in --muted
Same (light) 2.78:1 5.19:1
  • Filled controls get their own tokens, --accent-fill and --accent-fill-hover. --accent is unchanged for links, tags, focus rings, sort arrows and the brand mark.
  • Hover on a primary button swaps to the hover fill instead of applying filter: brightness(1.1), which lowered contrast in both themes.
  • --dim is now used for decoration only: the empty-value dashes and the unknown-status dot, which sits next to its text label.
  • Placeholders carry real hints (the CIDR format, what the bulk value is for), so they use --muted with opacity: 1 (review follow-up, second commit).

Testing

  • make vet, make license-check and go test ./... pass locally.
  • The "After" ratios were measured from computed styles in headless Chromium, in both themes, including the hovered button. The "Before" ratios are calculated from the old token values.

🤖 Generated with Claude Code

fred's review of PR #18 found two pairs under WCAG's 4.5:1 for small
text, both shipped in v0.3.0:

- White on the accent blue (#3b82f6) is 3.68:1, and 3.18:1 on hover.
  Filled controls (primary buttons, the selected settings segment) now
  use a deeper blue, #2563eb: 5.17:1, and 4.78:1 on hover. The accent
  itself is unchanged for links, tags, focus rings and the brand mark.
  The light theme already used #2563eb; its hover no longer lightens
  the fill (that dipped to 4.44:1) and darkens to #1d4ed8 instead.
- --dim on a panel is 2.98:1 (3.09:1 in the light theme). It labelled
  real states and values: scanning "off", host status "unknown", and
  the version string. Those now use --muted (5.92:1 dark, 5.76:1
  light). --dim stays for decoration only: empty-value dashes and the
  unknown-status dot, which sits next to its text label.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T02:10:03.879008Z e21aaa3 Manual request
🔒 Security Review ✅ Completed 2026-11-19T02:07:28.819746Z 5ec7136 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

fred review: 5ec713634f407d352963320102308683b90df2f8

The #18 contrast findings are addressed: filled controls now use higher-contrast fills in both themes, and the status labels and version use --muted.

P3 follow-up: Please move placeholders to --muted too. input::placeholder, textarea::placeholder still uses --dim, but placeholders include useful text, such as the bulk-edit field's explanation and the CIDR format example. They aren't purely decoration and should meet the same 4.5:1 target.

Static review only. Codex code review completed without findings; Codex Security was pending at review time.

Review follow-up on PR #20: placeholders still used --dim, but they
carry real hints (the CIDR format example, what the bulk value field
is for). They now use --muted with opacity pinned to 1: 6.26:1 in the
dark theme and 5.19:1 in the light one, measured on the rendered
inputs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@AlteredParadox

Copy link
Copy Markdown
Owner Author

claude: the fred P3 follow-up on 5ec7136 is addressed in e21aaa3. Placeholders now use --muted with opacity: 1. Measured on the rendered inputs (CIDR field, host filter, bulk value): 6.26:1 in the dark theme and 5.19:1 in the light theme. --dim is now used only for the empty-value dashes and the unknown-status dot.

The "Not changed" note in the PR description about placeholders no longer applies.

@codex review

Copy link
Copy Markdown
Owner Author

fred review: e21aaa311ab94e844dc02281e00874f9a92f7a04

The placeholder contrast follow-up is fixed: inputs and textareas now use --muted at full opacity, and the earlier contrast fixes remain in place. No additional findings in static review. See the Codex summary for exact review scope. No local execution.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: e21aaa311a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sonarqubecloud

Copy link
Copy Markdown

@AlteredParadox
AlteredParadox merged commit 7b717b4 into main Nov 19, 2026
9 checks passed
@AlteredParadox
AlteredParadox deleted the contrast-fix branch November 19, 2026 02:12
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