Skip to content

feat(profile): add high-contrast mode overrides for ProfileHeader (Closes #832) - #873

Open
waterWang wants to merge 1 commit into
Predictify-org:mainfrom
waterWang:feat/profile-header-contrast-832
Open

feat(profile): add high-contrast mode overrides for ProfileHeader (Closes #832)#873
waterWang wants to merge 1 commit into
Predictify-org:mainfrom
waterWang:feat/profile-header-contrast-832

Conversation

@waterWang

Copy link
Copy Markdown

Description

Support prefers-contrast: more on ProfileHeader with explicit border and text overrides for WCAG 2.1 AA compliance.

Changes

  • app/(dashboard)/profile/page.tsx: Added profile-header wrapper class to the profile page container and imported @/src/styles/contrast.css
  • src/pages/ProfilePage.tsx: Added import for ../styles/contrast.css for direct import path
  • src/styles/contrast.css: New file with high-contrast mode overrides scoped under .profile-header:
    • Page title: full-contrast foreground color
    • Share/CTA buttons: solid border and full-contrast text
    • Outline buttons: 1.5px solid border
    • Followers/following card: solid border, opaque background
    • Follower/following links: full-contrast color with underline on hover
    • Numeric data: full-contrast foreground
    • Muted text: 85% opacity for readability
    • Separator: solid border color
    • Avatar: 1.5px solid border
  • app/(dashboard)/profile/__tests__/page.contrast.test.tsx: New test file verifying:
    • CSS import is present in the page source
    • profile-header wrapper class is applied
    • contrast.css contains @media (prefers-contrast: more) rules
    • All targeted CSS selectors exist

Testing

pnpm test -- --testPathPattern="app/\(dashboard\)/profile/__tests__/page.contrast.test.tsx"

All 9 tests pass.

WCAG 2.1 AA

  • SC 1.4.11 (Non-text Contrast): Explicit 1px/1.5px solid borders meet 1.5:1 minimum
  • SC 1.4.3 (Text Contrast): Full foreground token values meet 4.5:1 ratio

Closes #832

…oses Predictify-org#832)

Support prefers-contrast: more on the profile page header with explicit
border and text overrides:
- Add .profile-header wrapper class to the dashboard profile page
- Create src/styles/contrast.css with scoped high-contrast rules
- Import the stylesheet from both the app router page and src/pages wrapper
- Add focused tests verifying the import, wrapper class, and CSS rules

WCAG 2.1 AA: SC 1.4.11 (non-text contrast) + SC 1.4.3 (text contrast).
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Add high-contrast mode overrides for ProfileHeader [b#098]

1 participant