Problem/Motivation
Two accessibility slips on shipped Canvas pages, both measured in a real browser:
- Donate has no
h1.content/canvas_page/10-donate.ymlsets the page-title heading component tolevel: 2, so/donaterenders its title as anh2and the page has no first-level heading. axe reportspage-has-heading-one. Seven of the eight shipped Canvas pages (Home, About, Resources, Our Programs, Events, Countries, Our Impact) set that component tolevel: 1; Donate is the only outlier. - Our Impact's three headline figures fail WCAG AA contrast.
content/canvas_page/07-impact.ymlsetsnumber_color: text-primaryon "20K+ Lives Protected", "137K+ Legal Aid Hours" and "11K+ Communities Served". In Vartheme BS5 Horizon Aid--bs-primaryis 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-contraston all three. The five smaller figures on the same page usetext-secondary(navy#0d2c54, 13.95:1) and pass. The identical three figures on Home and Countries already usenumber_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
- Install the Horizon Aid site template (1.0.x-dev) fresh.
- Visit
/donate. Inspect the page title: it renders as<h2>, no<h1>on the page. Run an axe scan:page-has-heading-onefails. - Visit
/impact. Inspect the three headline figures ("20K+", "137K+", "11K+"). Run an axe scan:[serious] color-contrastfails 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'slevel: 2becomeslevel: 1.content/canvas_page/07-impact.yml: the threenumber_color: text-primarybecomenumber_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
h1instead of anh2; 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
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
Comment #6
rajab natshah✅ Released horizonaid-1.0.0-alpha1
Comment #7
rajab natshahComment #8
rajab natshah