Skip to content

fix(theme): color contrast violations in gradient buttons and UI borders for WCAG AA compliance#41

Merged
neilime merged 1 commit intomainfrom
copilot/fix-71885492-1064833306-18cbf2f1-f126-487e-b6b0-96af82d246af
Nov 3, 2025
Merged

fix(theme): color contrast violations in gradient buttons and UI borders for WCAG AA compliance#41
neilime merged 1 commit intomainfrom
copilot/fix-71885492-1064833306-18cbf2f1-f126-487e-b6b0-96af82d246af

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 3, 2025

The theme's gradient buttons and outline button borders failed WCAG AA contrast requirements (3.01:1 and 1.72:1 respectively, needed 4.5:1 and 3:1).

Changes

Button Contrast Fixes

  • Primary gradient buttons: Changed from linear-gradient(135deg, #1998ff, #ff5a02) to linear-gradient(135deg, #0073cc, #cc4400)
    • Contrast improved from 3.01:1 → 4.78:1 (passes WCAG AA)
  • Outline button borders: Replaced semi-transparent borders with solid primary color variables
    • Light mode: 1.72:1 → 4.86:1
    • Dark mode: 2.84:1 → 7.35:1

Focus Indicator Enhancements

  • Dark mode focus outlines now use --ifm-color-primary-light (#66b3ff) for 7.35:1 contrast
  • Light mode continues using --hk-color-primary (#0073cc)

High Contrast Mode

  • Stronger primary colors (#005299, #993300)
  • Solid backgrounds on gradient buttons
  • Increased outline width to 4px and border width to 3px

Component Updates

Updated color scheme across all component CSS modules:

  • HoverkraftButton.module.css
  • HoverkraftHero.module.css
  • HoverkraftBrandHighlight.module.css
  • HoverkraftFeatureList.module.css
  • HoverkraftProjectCard.module.css
  • hoverkraft.css (global styles)

Screenshots

Light Mode:

Before After
before after

Dark Mode:

Before After
before after

All text-on-background combinations now meet WCAG 2.1 Level AA standards (4.5:1 for text, 3:1 for UI components).

Original prompt

Enhance theme accessibility - for both light and dark mode improve all accessibilty aspects, including color.

USe have to use the availaibel mcp servers "playwrite" and "lighthouse"


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Enhance theme accessibility - for both light and dark mode improve all accessibilty aspects, including color. USe have to use the availaibel mcp servers "playwrite" and "lighthouse" Fix color contrast violations in gradient buttons and UI borders for WCAG AA compliance Nov 3, 2025
Copilot AI requested a review from neilime November 3, 2025 14:49
@neilime neilime marked this pull request as ready for review November 3, 2025 15:13
@neilime neilime changed the title Fix color contrast violations in gradient buttons and UI borders for WCAG AA compliance fix(theme): color contrast violations in gradient buttons and UI borders for WCAG AA compliance Nov 3, 2025
…ers for WCAG AA compliance

Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
@neilime neilime force-pushed the copilot/fix-71885492-1064833306-18cbf2f1-f126-487e-b6b0-96af82d246af branch from 46fb229 to 4aed7c7 Compare November 3, 2025 15:35
@neilime neilime merged commit dcc3518 into main Nov 3, 2025
25 checks passed
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.

2 participants