fix: #3614488 Configurable heading level on the Share component for correct heading order
Fixes the axe-core WCAG 2.4.6 heading-order violation found across the Educare site template (homepage, /programs, program page, news article, /events, event page, /about).
Issue: https://www.drupal.org/project/vartheme_bs5_educare/issues/3614488 Related recipe fix: https://www.drupal.org/project/educare/issues/3614489 (MR: educare!14 (merged))
The Share (webshare) molecule always rendered its title as a hardcoded <h3>, breaking the outline whenever it sat under anything other than an
section. Adds a heading_level prop (integer, enum 2-6, default 2) to share.component.yml and uses it in share.twig (<h{{ heading_level }}>) so callers can set the correct semantic level. Visual size stays fixed via the existing webshare__heading class.
Verified: axe heading-order is 0 across the 7 affected pages on a fresh install; card/heading visual sizes unchanged; gitlab-ci-local green on this repo.
AI-Generated: Yes
Checkpoints
- File an issue about this project
- Addition/Change/Update/Fix to this project
- Testing to ensure no regression
- Automated unit/functional testing coverage
- Developer Documentation support on feature change/addition
- User Guide Documentation support on feature change/addition
- UX/UI designer responsibilities
- Accessibility and Readability
- Reviewed by a human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Update Release Notes
- Release
Edited by Rajab Natshah