feat: improve dark mode contrast across landing sections#623
feat: improve dark mode contrast across landing sections#623rahimatonize wants to merge 1 commit into
Conversation
|
@rahimatonize is attempting to deploy a commit to the ezedikeevan's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@rahimatonize Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
- Hero: Improve badge background contrast (blue-950 -> blue-900/30) - Hero: Add dark mode variant for blue accent text (blue-400) - Hero: Enhance description readability (gray-400 -> gray-300) - StatBar: Remove low-opacity background (gray-800/50 -> gray-800) - StatBar: Add dark mode variant for icon (blue-400) - StatBar: Improve label contrast (gray-400 -> gray-300) - Module card: Enhance green icon background contrast (green-950/30 -> green-900/40) - Module card: Add dark mode variant for green icon (green-400) - Module card: Improve card text contrast (gray-400 -> gray-300) - Module card: Add dark mode hover shadow variant - Explainer: Add background for better section definition - Explainer: Brighten step number circles (blue-600 -> blue-500 in dark) - Explainer: Improve body text contrast (gray-400 -> gray-300) All changes follow WCAG AA contrast guidelines for improved legibility. Resolves ezedike-evan#519
ezedike-evan
left a comment
There was a problem hiding this comment.
CI workflows haven't triggered for this PR yet. Please push an empty commit or close and reopen to re-trigger GitHub Actions. Once check (node 20) and check (node 22) go green, we can proceed with review.
ezedike-evan
left a comment
There was a problem hiding this comment.
The check (node 20) job is failing with a snapshot mismatch in tests/components/HomePage.test.tsx:
FAIL tests/components/HomePage.test.tsx > HomePage > matches snapshot
Your dark-mode contrast changes altered the component's rendered output, which caused the existing snapshot to become stale. Please update it:
npx vitest run --reporter=verbose tests/components/HomePage.test.tsx -uCommit the updated snapshot and push.
Summary
This PR audits and fixes dark-mode contrast issues across all landing page sections, ensuring legibility and following WCAG AA accessibility guidelines.
Changes
🎨 Hero Component (
components/landing/Hero.tsx)dark:bg-blue-950→dark:bg-blue-900/30dark:text-blue-400for the blue highlighted phrasedark:text-gray-400→dark:text-gray-300📊 StatBar Component (
components/landing/StatBar.tsx)dark:bg-gray-800/50→dark:bg-gray-800for solid contrastdark:text-blue-400(was using onlytext-blue-600)dark:text-gray-400→dark:text-gray-300🏠 Main Landing Page (
app/page.tsx)Module Card Section
dark:bg-green-950/30→dark:bg-green-900/40(40% opacity for better visibility)dark:text-green-400for the ArrowDownRight icondark:text-gray-400→dark:text-gray-300dark:hover:shadow-gray-900/50Explainer Section
dark:bg-gray-800/50for better section definitionbg-blue-600→dark:bg-blue-500for better visibilitydark:text-gray-400→dark:text-gray-300Contrast Improvements Summary
blue-950(very dark)blue-900/30(lighter, translucent)blue-600(no variant)blue-600/blue-400gray-400gray-300gray-800/50(semi-transparent)gray-800(solid)blue-600(no variant)blue-600/blue-400green-950/30(very dark)green-900/40(lighter)green-600(no variant)green-600/green-400blue-600(no variant)blue-600/blue-500Testing
Manual Verification Checklist
Color Contrast Standards
All changes maintain WCAG AA contrast ratios:
Screenshots
Before vs After (Dark Mode)
Hero Section
blue-400StatBar
blue-400for better visibilitygray-300Module Card
green-400Explainer
Notes
gray-400→gray-300for better text legibility-400variant for darkAcceptance Criteria
Closes #519