Skip to content

A11y: high-confidence round3 semantic and accordion fixes - #5645

Open
accesswatch wants to merge 4 commits into
mainfrom
accessibility-fixes-high-confidence-round3
Open

accesswatch wants to merge 4 commits into
mainfrom
accessibility-fixes-high-confidence-round3

Conversation

@accesswatch

Copy link
Copy Markdown
Contributor

Summary

  • High-confidence round 3 remediation focused on remaining semantic/accessibility defects in shared navigation and accordion components.

Issue fixes in this PR

  1. Accordion labeling/structure (modules/custom/az_accordion/templates/az-accordion.html.twig)
    • Fixes collapse panel aria-labelledby to reference the header button ID (not the panel ID).
    • Fixes data-bs-parent to reference the accordion container ID.
  2. Mobile nav link semantics (modules/custom/az_core/src/Plugin/Block/MobileNavBlock.php)
    • Removes invalid type=button and redundant role=button attributes from links.
  3. Select menu button semantics (modules/custom/az_select_menu/src/Plugin/Block/AzSelectMenu.php)
    • Removes redundant role=button and tabindex from native <button>.
  4. Mobile header control naming (themes/custom/az_barrio/templates/layout/page.html.twig)
    • Adds explicit control labels (open search/menu, close menu, home).
  5. Breadcrumb landmark label normalization (themes/custom/az_barrio/templates/navigation/breadcrumb.html.twig)
    • Uses translated Breadcrumb landmark label.

Test plan

  1. Accordion pages: verify each accordion toggle expands/collapses correctly and screen readers announce panel relationship.
  2. Mobile navigation offcanvas: verify open search/menu, home, and close controls have clear accessible names in accessibility tree.
  3. Mobile nav links and select-menu action button: verify keyboard behavior unchanged and no nested/invalid interactive role warnings are introduced.
  4. Breadcrumb: verify landmark is announced as Breadcrumb and rendering remains unchanged.
  5. Re-run PR accessibility/CI checks and compare scan deltas against baseline dashboard snapshot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 28, 2026 02:06
@accesswatch
accesswatch requested review from a team as code owners May 28, 2026 02:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">
accesswatch and others added 2 commits August 7, 2026 11:00
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@accesswatch

Copy link
Copy Markdown
Contributor Author

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>
@accesswatch

Copy link
Copy Markdown
Contributor Author

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
accesswatch requested a review from joeparsons August 7, 2026 20:07
@trackleft

Copy link
Copy Markdown
Member

@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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants