Loading
fix: #3614491 Configurable heading level on the Share component for correct heading order
Fixes the axe-core WCAG 2.4.6 heading-order violation on the Share component: its title always rendered as a hardcoded <h3>, breaking the document outline whenever it sat under anything other than an <h2> section.
Issue: https://www.drupal.org/project/vartheme_bs5_horizonaid/issues/3614491
This ports the same fix already merged on drupal/vartheme_bs5_educare's Share molecule (issue #3614488, MR !22), which has the identical hardcoded <h3> pattern.
- Adds a
heading_levelprop tocomponents/molecules/share/share.component.yml(integer, enum 2-6, default 2). share.twig:<h{{ heading_level }}>instead of the hardcoded<h3>.- Visual size stays fixed via the existing
webshare__headingCSS class.
Verified: gitlab-ci-local green on a clean checkout of the 1.0.x branch with only this diff applied (Theme build, ESLint, Stylelint, Cspell, PHPStan all pass).
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