Darken frm-orange-tag and frm-green-tag foregrounds to pass WCAG AA contrast - #3340
vivi-the-going-merry[bot] wants to merge 2 commits into
Conversation
…ontrast Both fail 4.5:1 at .frm-meta-tag's 14px/600 weight: orange (var(--orange) on #fef7f4) measures 3.18:1, green (white on --success-500) measures 2.62:1. Grey, red, and lt-green tags already pass and are unchanged. Orange: darkened foreground to #b54708 (5.12:1), scoped to this rule rather than the shared --orange token, which other rules at other sizes/backgrounds also rely on. Green: switched to the same near-black already used for the grey tag (6.77:1) -- no success-family shade clears 4.5:1 against --success-500, and reusing the pale lt-green pairing would make the two tags visually indistinguishable, which is the exact problem the issue describes for orange/grey. Hand-applied the equivalent minified rule to css/frm_admin.css (frm_testing_mode.css doesn't include meta-tag styles) -- npm run build wasn't run on this shared machine. Verified both new pairings and the three unchanged ones live via computed styles in a formidable-preview-env instance, not just source comparison. Closes #6646 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Sep 15, 2026 3:47p.m. | Review ↗ | |
| JavaScript | Sep 15, 2026 3:47p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Verified live in formidable-preview-env (real .frm_wrap cascade, not a bare stylesheet load) — checked out both main and the PR head, injected synthetic badges for all five modifiers into an actual admin page, read getComputedStyle, and independently recomputed WCAG contrast from the resolved sRGB values rather than trusting the PR body's numbers:
.frm-orange-tag:#b54708on#fef7f4→ 5.11:1 (independently recomputed, matches the PR's claimed 5.12:1).frm-green-tag:var(--grey-900)(#101828) on--success-500(#12b76a) → 6.77:1 (matches exactly)
Both clear the 4.5:1 AA bar for this component's actual size/weight (14px/600).
Green now reads clearly against the badge fill; orange is visibly darker without tipping into brown. Grey/red/lt-green (unchanged) still render as before, and orange/green stay visually distinct from grey/lt-green.
Other checks:
- Scoping is correct — the fix overrides
coloron the specific.frm-orange-tag/.frm-green-tagrules rather than the shared--orangetoken, so it can't affect other rules/sizes that reuse that token elsewhere. - Compiled
css/frm_admin.cssdiff verified byte-for-byte against the.scsschange — the minified file is one line; the only hunk is that line, and the only substrings that differ are the two target rules'colorvalues. Nothing else in the file moved. - CI green across the board (Psalm, PHPStan, PHPCS, Stylelint, etc.) — no test suite applies to a pure color-value change.
- No accessibility/semantics regression — these are decorative text-color changes only, no markup/attribute change.
No blocking findings. Approving.
|
Follow-up, non-blocking — one thing worth clarifying in the PR description:
Doesn't affect the code fix itself, which is verified correct — flagging so the tracked issue doesn't stay open after this ships. |
|
Fixed the cross-repo Method: PR-description edit (no code/commit change) |
|
Round 2 of this handoff arrived with no accompanying review, top-level comment, or inline comment — checked all three (reviews list, issue comments, PR review comments) plus the full timeline: nothing between my 16:11:49 reply and the 16:20:36/37 label swap. Current state: PR body carries Closes Strategy11/formidable-pro#6646 (fixed last round), the sole review is APPROVED, latest CI run is green. Suspected mechanism, worth a human check rather than a diagnosis from here: round 1's trigger was an Approve with a non-blocking note attached as a top-level comment, not an inline thread — no GitHub-native "resolved" state for that. If the review poll re-evaluates trigger state instead of diffing against my reply, the same condition could re-fire every round regardless of what changes. Clearing vivi-working (and vivi-pickup, defensively) — this is round 2 of 3 under the round-trip cap, and re-filing franky-review with nothing new to review just spends round 3. Leaving this for a human call rather than guessing at unstated work. |


What was broken
Two of the five
.frm-meta-tagcolour modifiers fail WCAG 2.1 AA contrast (4.5:1) at the size/weight the component actually renders (14px, weight 600 -- below the "large text" threshold that would allow the relaxed 3:1 minimum):.frm-orange-tagvar(--orange)(#f15a24)#fef7f4.frm-green-tag#fffvar(--success-500)(#12b76a)Grey, red, and lt-green tags already pass and are unchanged.
What changed
resources/scss/admin/components/_meta-tag.scss:.frm-orange-tag: foreground darkened to#b54708(5.12:1). Scoped to this rule rather than the shared--orangetoken, which other rules at other sizes/backgrounds also rely on..frm-green-tag: foreground switched tovar(--grey-900)(6.77:1) -- the same near-black already used for the grey tag. No shade in the--successfamily clears 4.5:1 against--success-500as a background (--success-900, the darkest available, is only ~3.7:1), and reusing lt-green's pale background/dark-text pairing would make the two tags visually indistinguishable, which is the exact meaning-collision problem the issue describes for orange vs. grey.Hand-applied the equivalent minified rule to
css/frm_admin.css(css/frm_testing_mode.cssdoesn't include meta-tag styles at all) --npm run buildwasn't run on this shared machine. Diffed the compiled file before/after: exactly 5 bytes changed, both inside the two target rules, nothing else touched.How it was verified
Live in a
formidable-preview-envinstance, not just source-level comparison -- loaded the real compiledfrm_admin.csson an actual admin page and readgetComputedStyleon synthetic badges (so the real cascade/.frm_wrapcustom-property resolution applies, same as a rendered badge):.frm-orange-tag.frm-green-tag.frm-grey-tag/.frm-red-tag/.frm-lt-green-tagAlso screenshotted all five side by side to confirm orange still reads as orange (not brown) and green stays visually distinct from lt-green.
Closes Strategy11/formidable-pro#6646