Skip to content

[fineract-site] Fix WCAG 2.1 AA color contrast violations - FINERACT-2503#54

Open
AliRana30 wants to merge 2 commits intoapache:asf-sitefrom
AliRana30:fix/wcag-contrast-fixes
Open

[fineract-site] Fix WCAG 2.1 AA color contrast violations - FINERACT-2503#54
AliRana30 wants to merge 2 commits intoapache:asf-sitefrom
AliRana30:fix/wcag-contrast-fixes

Conversation

@AliRana30
Copy link

Summary

Resolves all 23 color contrast violations to meet WCAG 2.1 Level AA standards. This PR focuses strictly on color/contrast fixes and does not include any layout or structural changes.

Key Fixes

  • Navbar: Switched to high-contrast light theme (white background, dark grey text).
  • Footer: Switched to light theme with dark teal text for readability.
  • Icons: Restored all sidebar icons to accessible teal (#00695C).
  • Dark Mode: Applied global text overrides to fix nearly invisible text caused by Materialize defaults.

Accessibility Audit

Metric Baseline Post-Fix
WAVE Contrast Errors 23 0
AIM Score 1.7/10 9.8/10
Lighthouse Accessibility -- 85/100

Testing

  • Verified with WAVE Evaluation Tool & Lighthouse.
  • Manual cross-theme inspection on localhost:8000.

Jira: FINERACT-2503
Related: FINERACT-2484

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@AliRana30 AliRana30 marked this pull request as draft February 23, 2026 22:00
@meonkeys
Copy link
Contributor

Thanks! I'll review this now.

Friendly reminder: if/when you change this PR, do so in new commits and do not rebase/squash/force push unless you have a good reason to do so. If you do force push please say when/why you do. This was recently added to CONTRIBUTING.md for this repo (and note it differs from apache/fineract repo policy).

@AliRana30
Copy link
Author

@meonkeys Thanks! for you review, I have read all your concerns. Next time I will be more careful with everything and will try to fix everything soon.

@meonkeys
Copy link
Contributor

meonkeys commented Feb 26, 2026

Please also update CONTRIBUTING.md. I want the next developer to understand how they should use Wave/Lighthouse/etc. to check their work. Maybe add a few words of instruction under ### compliance?

Are there any local-first/automated tools we can just build WCAG compliance into our checks? I strongly prefer this approach. Maybe WAVE or Lighthouse have a tool we can use? Maybe put axe back in and give it a configuration matching what you're checking manually in Wave/Lighthouse? Maybe try Oobee (mentioned by Damian)?

@AliRana30 AliRana30 force-pushed the fix/wcag-contrast-fixes branch from cf4f989 to c68cb62 Compare March 1, 2026 20:47
@AliRana30 AliRana30 marked this pull request as ready for review March 1, 2026 20:56
@AliRana30 AliRana30 force-pushed the fix/wcag-contrast-fixes branch from 0a56420 to ace4a35 Compare March 1, 2026 21:19
@AliRana30
Copy link
Author

AliRana30 commented Mar 1, 2026

@meonkeys Apologies for getting late. I was working hard to resolve all your concerns and bugs.
Here are all before after changes for this PR :

What changed

  • Added CSS variables for light/dark theme with WCAG 2.1 AA compliant colors (--link-color: #00796B light, #4db6ac dark)
  • Fixed 130+ contrast failures: headings, body text, links, chips, buttons, card panels, collection items in both modes
  • Fixed icon-text alignment in About/Contribute/mailing sections with flexbox (overrides Materialize float: left default)
  • Fixed Subscribe/Archives button icons separating from text (display: inline-flex)
  • Removed 243-line duplicate CSS block that was silently overriding all fixes
  • Removed dead nav .brand { display: none } rule that was hiding sidebar brand text
  • Added WCAG Testing section to CONTRIBUTING.md (Lighthouse, WAVE, axe, Oobee)
  • Added cache-busting ?v=20260302h on CSS links

How tested

  • Lighthouse: Desktop 100/100, Mobile 89/100
  • WAVE WebAIM: 1.7 → 9.8
  • Manually on 375px, 768px, 1440px in Chrome, both light and dark mode

@AliRana30
Copy link
Author

AliRana30 commented Mar 1, 2026

Wave Aim Score before was 1.7 , which is now:

For Light mode :

light

For Dark mode :

night

@AliRana30
Copy link
Author

Lighthouse report :

For Mobile :

lighthouse mobile

For Desktop:

lighthouse  desktop

Copy link
Contributor

@meonkeys meonkeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some more changes. Please also go through all my previous review questions and comment/resolve them appropriately.

…k mode

Signed-off-by: Ali Mahmood <alimahmoodrana82@gmail.com>
…alignment

Signed-off-by: Ali Mahmood <alimahmoodrana82@gmail.com>
@AliRana30 AliRana30 force-pushed the fix/wcag-contrast-fixes branch from 859bce0 to 411bfe3 Compare March 5, 2026 13:58
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