A11y: high-confidence round3 semantic and accordion fixes - #5645
accesswatch wants to merge 4 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Accessibility-focused remediation pass to improve semantic correctness and assistive-technology support across shared navigation and accordion components in the Quickstart Drupal distribution.
Changes:
- Fixes accordion ARIA relationships and Bootstrap accordion parenting to correctly associate headers/panels and collapse behavior.
- Improves mobile header/offcanvas control accessible names and removes invalid/redundant interactive attributes on links/buttons.
- Normalizes breadcrumb landmark labeling via translation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
themes/custom/az_barrio/templates/navigation/breadcrumb.html.twig |
Translates breadcrumb landmark label for consistent announcement. |
themes/custom/az_barrio/templates/layout/page.html.twig |
Adds explicit accessible names for mobile header/offcanvas controls. |
modules/custom/az_select_menu/src/Plugin/Block/AzSelectMenu.php |
Removes redundant role/tabindex from native button attributes. |
modules/custom/az_core/src/Plugin/Block/MobileNavBlock.php |
Removes invalid/redundant type/role attributes from rendered links. |
modules/custom/az_accordion/templates/az-accordion.html.twig |
Corrects aria-labelledby and data-bs-parent targeting for accordion items. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div class="offcanvas offcanvas-end mw-100 w-100 bg-white d-flex d-lg-none overflow-y-auto" tabindex="-1" id="azMobileNav" aria-label="Mobile navigation"> | ||
| <div class="offcanvas-header sticky-top p-0 mb-2 {{ az_header_blue ? 'text-bg-blue' : 'text-bg-red' }} text-bg-red d-flex justify-content-between align-items-center"> | ||
| <a href="/" class="btn btn-arizona-header"> | ||
| <a href="/" aria-label="{{ 'Go to homepage'|t }}" class="btn btn-arizona-header"> |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Sequencing note for reviewers: this round3 branch currently includes the same navigation semantics changes as #5644 (round2), plus the az_accordion labeling fix that is unique to this PR. Suggested order: land #5644 first (previously approved, conflicts now resolved), then I will re-merge main here so this PR collapses to the accordion-only diff (3 insertions, 2 deletions) before review. Holding off on requesting individual review until then to keep the diff small. |
The shared navigation semantics changes are delivered by #5644 (round2); restore those four files to main so this PR reviews as the accordion change alone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Update: scoped this PR down now rather than waiting. The shared navigation changes are reverted here (they remain in #5644 where they were already approved), so this PR is now the az_accordion labeling fix alone - a 3-line template diff. Ready for review independently of #5644; whichever lands first, the other merges cleanly. |
|
@accesswatch was this resolved in a different way in https://github.com/az-digital/az_quickstart/pull/5645/changes It looks like an id was given to the heading "h3" and the accordion parent was removed? End result testable here: https://demo.quickstart.arizona.edu/pages/accordions |
Summary
Issue fixes in this PR
modules/custom/az_accordion/templates/az-accordion.html.twig)aria-labelledbyto reference the header button ID (not the panel ID).data-bs-parentto reference the accordion container ID.modules/custom/az_core/src/Plugin/Block/MobileNavBlock.php)type=buttonand redundantrole=buttonattributes from links.modules/custom/az_select_menu/src/Plugin/Block/AzSelectMenu.php)role=buttonandtabindexfrom native<button>.themes/custom/az_barrio/templates/layout/page.html.twig)themes/custom/az_barrio/templates/navigation/breadcrumb.html.twig)Breadcrumblandmark label.Test plan