Skip to content

Fix sunset contrast on blog card text and gate it in check:contrast - #68

Merged
amyrlam merged 1 commit into
claude/github-issue-60-viewport-fitfrom
claude/github-issue-60-sunset-contrast
Aug 24, 2026
Merged

Fix sunset contrast on blog card text and gate it in check:contrast#68
amyrlam merged 1 commit into
claude/github-issue-60-viewport-fitfrom
claude/github-issue-60-sunset-contrast

Conversation

@amyrlam

@amyrlam amyrlam commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Explains and fixes the Lighthouse a11y failure on #67 — which was not caused by that PR.

What actually failed

The red run's blog reports show color-contrast at 0 with sunset colors (#ccbbcd on #754562, 4.15:1). Comparing runs: main's last green Lighthouse ran at 23:11 UTC (4pm PDT, daylight) and this one at 03:16 UTC (8:16pm PDT — San Francisco sunset). Lighthouse audits the live computed sky, and at dusk the ink/card pairing bottoms out at ~6.6:1 — still fine, but the blog date/description lines carried opacity-70/opacity-80, which multiplies the effective contrast down to ~4.15:1, under the 4.5:1 floor for small text. The identical failure exists on main; CI has just never run at sunset before. (The label-content-name-mismatch audit in the report scores 0 on green main runs too — it carries no category weight, red herring.)

The fix

  • Remove the opacity de-emphasis from the three blog card text lines — size and tracking already carry the hierarchy, and any opacity on computed-contrast surfaces silently voids the guarantee at some sun altitude.
  • Add the ink-on-card pairing (--ink on --card-bg, what .sky-card text actually renders) to check:contrast with a 4.5:1 floor swept across every sun altitude. Worst case is now 6.56:1 at dusk, and any future opacity/color change that reintroduces this fails the build deterministically instead of only when CI lands at golden hour.

Verified

check:contrast passes with the new gate (worst card-text 6.56:1 at −4.5°); all 19 Playwright tests pass; Prettier/ESLint clean; DOM-verified in the browser that the date line renders at opacity 1 with full ink.

After this merges, rebasing/re-running #67 should go green regardless of what time of day CI runs.

🤖 Generated with Claude Code

PR #67's Lighthouse run failed a11y (0.94) on both blog pages — not
because of that PR: the run happened at 03:16 UTC, San Francisco
sunset, and Lighthouse audits the live sky. At dusk the computed
ink/card pairing bottoms out at ~6.6:1, and the blog date and
description lines carried opacity-70/80, multiplying the effective
contrast down to ~4.15:1 — under the 4.5:1 floor for small text. The
same failure exists on main; daytime CI runs just never see it.

Drop the opacity de-emphasis (size and tracking already carry the
hierarchy) and add the ink-on-card pairing to check:contrast with a
4.5:1 floor across every sun altitude (worst case 6.56:1), so this
class of regression fails the build deterministically instead of only
when CI happens to run at sunset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
youthphase Ready Ready Preview Aug 18, 2026 3:39am

@amyrlam
amyrlam changed the base branch from main to claude/github-issue-60-viewport-fit August 24, 2026 03:05
@amyrlam
amyrlam merged commit 8504af1 into claude/github-issue-60-viewport-fit Aug 24, 2026
8 checks passed
@amyrlam
amyrlam deleted the claude/github-issue-60-sunset-contrast branch August 24, 2026 03:06
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