Skip to content

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

Open
accesswatch wants to merge 1 commit into
mainfrom
accessibility-fixes-high-confidence-round3
Open

A11y: high-confidence round3 semantic and accordion fixes#5645
accesswatch wants to merge 1 commit 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
Copy link
Copy Markdown

Copilot AI left a comment

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">
@az-digital-bot
Copy link
Copy Markdown
Contributor

Tugboat has finished building the preview for this pull request!

Link:

Dashboard:

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