fix: pricing and advisory body text is legible again (1.08:1 to 7.57:1) - #61
Conversation
--muted is a surface color (#f7f7f7 light, #151515 dark), but four pages used it as a text color, rendering text the same shade as the card behind it. On /pricing that measured 1.08:1 in dark and 1.07:1 in light against a WCAG AA floor of 4.5:1, so every feature bullet and description on the Plus and Partner cards was invisible in both themes. Swap all 24 occurrences to --muted-foreground, the token that already covers secondary text in 65 other places: 7.57:1 dark (AA and AAA) and 5.33:1 light. Add a test that fails if the surface token is used as a text color again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughUpdated advisory and pricing page text styles from ChangesMuted foreground token migration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Preview verificationPreview: Every text element was measured against its own resolved background, in both themes, on both affected pages. The pass criterion is the one the bug violated: no element below the WCAG AA 4.5:1 floor.
262 element measurements, zero failures. Before this PR the same A measurement caveat worth recordingMy first pass reported the Pro card as failing at 1.05:1 across 12 elements. That was wrong, and it is the same artifact that appeared in the original audit: the Pro card uses Re-measured by painting each color onto a 1x1 canvas and reading the pixel back, which resolves Screenshots1. 2. Compare against the pre-fix state, where only the middle Pro card was readable: https://raw.githubusercontent.com/recoupable/marketing/assets/pr56/shots/1-pricing-pro-card.png Regression guard
Suite 28/28, Fixes recoupable/chat#1909. Part of recoupable/chat#1902. |


Fixes recoupable/chat#1909. Most of the body text on
/pricingwas invisible: it rendered at 1.08:1 contrast in dark and 1.07:1 in light, against a WCAG AA floor of 4.5:1./pricingis the second most visited page on the site and it is the page meant to sell the product.Root cause
--mutedis a surface token, not a text token, and four pages used it as a text color.--muted#f7f7f7#151515--muted-foreground#6b6b6b#a0a0a0app/pricing/page.tsxpicked the text color with a highlighted-card ternary whose non-highlighted branch reached for the surface token, so only the middle Pro card (which hardcodestext-white/70and friends) was readable. Headings and prices use--foreground, which is why the page looked superficially fine: "Plus", "$19", "Partner" were legible and nothing else was.Change
All 24 occurrences of
text-[var(--muted)]swapped totext-[var(--muted-foreground)], the token already used correctly in 65 other places:app/pricing/page.tsxapp/advisory/page.tsxapp/advisory/book/BookingForm.tsxapp/advisory/book/page.tsx/advisoryand/advisory/bookhad the identical defect, so they are fixed in the same pass. No change to--muteditself, which stays a surface token and is still used as one in 3 places.Measured result
#0a0a0acard)#151515at 1.08:1#a0a0a0at 7.57:1#ffffffcard)#f7f7f7at 1.07:1#6b6b6bat 5.33:1Regression guard
lib/__tests__/mutedTokenUsage.test.tswalksapp/,components/andlib/and fails if the surface token appears inside atext-*utility, naming the offending files. It runs under the existingpnpm test, so no CI config was needed.Proven to work in both directions rather than just asserted: with the token fix stashed the guard fails and lists all four files; with it applied the guard passes. It also skips
__tests__so it does not match the literal in its own source (it flagged itself on the first run).Verification
pnpm buildcompiles, all pages prerendered.Branch was cut from
mainafter #60 merged, soapp/pricing/page.tsxincludes the card-on-file CTA.Note for the other open pricing PRs: #57 and #58 both touch
app/pricing/page.tsxand will need a rebase on top of this.🤖 Generated with Claude Code
Summary by cubic
Restore readable body text on
/pricingand/advisoryby using the correct text token. Contrast improves from ~1.08:1 to 7.57:1 (dark) and 5.33:1 (light), meeting WCAG AA/AAA.text-[var(--muted)]withtext-[var(--muted-foreground)]across pricing and advisory pages (including booking); no token value changes.lib/__tests__/mutedTokenUsage.test.tsto fail if--mutedis used as a text color; runs viapnpm test.Written for commit 5316ed8. Summary will update on new commits.
Summary by CodeRabbit
Style
Tests