Problem/Motivation

Two accessibility slips on shipped Canvas pages, both measured in a real browser:

  1. Donate has no h1. content/canvas_page/10-donate.yml sets the page-title heading component to level: 2, so /donate renders its title as an h2 and the page has no first-level heading. axe reports page-has-heading-one. Seven of the eight shipped Canvas pages (Home, About, Resources, Our Programs, Events, Countries, Our Impact) set that component to level: 1; Donate is the only outlier.
  2. Our Impact's three headline figures fail WCAG AA contrast. content/canvas_page/07-impact.yml sets number_color: text-primary on "20K+ Lives Protected", "137K+ Legal Aid Hours" and "11K+ Communities Served". In Vartheme BS5 Horizon Aid --bs-primary is the brand yellow #ffc72c, so those numbers render yellow on white at 54px: 1.56:1 measured, where AA requires 3:1 for large text. axe reports [serious] color-contrast on all three. The five smaller figures on the same page use text-secondary (navy #0d2c54, 13.95:1) and pass. The identical three figures on Home and Countries already use number_color: text-black, so again Our Impact is the only outlier.

The design confirms it: in the VBNGO Stylesheet the only yellow text token is text/light-text #ffc72c, demonstrated over dark navy only. The design's figure numbers are navy #0d2c54 on a #ebf4fe panel (12.56:1) or #242424 on white (15.52:1); yellow on white is not a pairing the design system offers. Trap for future work: Bootstrap's text-primary resolves to the yellow brand fill, while the design's token named text/primary-text is navy, so the prop value reads like the design token and means the opposite.

Steps to reproduce

  1. Install the Horizon Aid site template (1.0.x-dev) fresh.
  2. Visit /donate. Inspect the page title: it renders as <h2>, no <h1> on the page. Run an axe scan: page-has-heading-one fails.
  3. Visit /impact. Inspect the three headline figures ("20K+", "137K+", "11K+"). Run an axe scan: [serious] color-contrast fails on all three (measured 1.56:1).

Proposed resolution

Two one-line content changes:

  • content/canvas_page/10-donate.yml: the page-title heading component's level: 2 becomes level: 1.
  • content/canvas_page/07-impact.yml: the three number_color: text-primary become number_color: text-black, matching Home and Countries.

Verified after applying both: /donate renders h1 Donate with no stray h2; the three Impact figures measure 21:1 instead of 1.56:1. The Horizon Aid functional testing suite's accessibility scenarios (issue #3615987) confirm it: the "navigable by assistive technology" outline passes all 8 rows (96 steps) where the Donate row previously failed on page-has-heading-one. This fix is what makes that suite's 07-quality job green; the two issues are related but this one stands on its own.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ✅ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Developer Documentation
  • ➖ User Guide Documentation
  • ➖ Reviewed by human
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

User interface changes

  • Donate page title now renders as an h1 instead of an h2; the three Our Impact headline figures render navy instead of yellow.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Fixed a missing page heading on Donate and a contrast failure on the Our Impact figures.

Issue fork horizonaid-3616336

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 8e63ea7a on 1.0.x
    fix: #3616336 Fix missing Donate h1 and Our Impact figure contrast
    

  • rajab natshah committed 64df674f on 1.0.x
    fix: #3616336 Keep the footer heading in document order on every page
    
rajab natshah’s picture

Assigned: Unassigned » josebc
Status: Active » Needs review
Issue tags: +horizonaid-1.0.0-alpha1
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.