Repository navigation
fix(ui): give status pills an opaque background so selection tints keep contrast - #274
Merged
Merged
Conversation
…ep contrast The status pills in the Forms inspector (the VALID, INVALID and PENDING badges, the error count in the forms list and the warning flag in the Fields table) and the error count on the Live route tab mixed their tint with transparent. On a selected row or item the accent tint showed through, which lowered the contrast: the INVALID badge on a selected Fields row measured 4.14:1 in the light theme and 4.50:1 in the dark theme, below or at the WCAG AA minimum of 4.5:1. Mix the tint with --surface instead, as the Analog inspector's live pill already does, so each pill has its own opaque background and the same contrast on normal, hovered and selected rows: 4.96:1 in light and 5.73:1 in dark for INVALID. Add a panel test that selects an invalid field and checks that no status pill rule falls back to a transparent background.
Contributor
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
Member
Author
|
The "Workers Builds: angular-devtools" check fails here the same way it fails on every open PR right now (#244 to #273 included), including PRs that do not touch the docs site. Its logs are only on the Cloudflare dashboard, so the cause can't be seen or fixed from this branch. The repo's own checks for this change (format, typecheck, panel tests, extension build, commit check) pass locally. Generated by Claude Code |
# Conflicts: # extension/ui/assets/browser-agent-rpc-BXhoSh1z-C_twCiPD.js # extension/ui/assets/browser-agent-rpc-BXhoSh1z-CjnCi3tC.js # extension/ui/assets/browser-agent-rpc-BXhoSh1z-d1Tsxw97.js # extension/ui/assets/index-BEfrZ0QX.js # extension/ui/assets/index-Bbf1x-bA.js # extension/ui/assets/index-ByEDQ2k8.js # extension/ui/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
In the light theme, the INVALID status badge on a selected row of the Forms inspector's Fields table measured 4.14:1, below the WCAG AA minimum of 4.5:1. The badge tint was mixed with
transparent, so the selected row's--accent-softtint showed through it. In the dark theme it sat at exactly 4.50:1.The badge tints are now mixed with
--surfaceinstead, as the Analog inspector's live pill already does. Each pill has its own opaque background, so its contrast is the same on normal, hovered and selected rows. The same change applies to the other status pills with this pattern:No tokens, labels or behaviour changed.
How it was verified
pnpm format:checkpnpm typecheck(includes thengctemplate check)pnpm test:panel(29 files, 165 tests), with a new test that selects an invalid field and checks that no status pill rule uses a transparent background (it fails on main)pnpm extension:build, withextension/uicommittedpnpm commit:checkscripts/panel-axe.mjs, on the installed Chromium 1194 becausepnpm test:axecould not launch its pinned one) on every tab and view, dark and light: no violations/examples/forms, Forms tab with an invalid field row pressed: axe finds no violations and nothing scrolls sideways at 1280px and 360px in both themes, and contrast measured in Chromium is 4.5:1 or more for every pill. With the old styles, axe reportscolor-contraston the badge in light.Screenshots
None attached.
Notes for reviewers
Found while verifying #272. The pill borders stay translucent on purpose: they are decorative and the text contrast does not depend on them. The Analog tables also tint the selected row, but their pills were already opaque, so they are unchanged. The Live route count value (4.95:1 after) is calculated, not measured in the browser.
Generated by Claude Code
Summary by CodeRabbit