Skip to content

Fix keyboard and ARIA state of the shared <a1-header> menus #1152

Open

Description

@A1L13N

Context

design-system/chrome.js renders the header used by every Alpha One Labs site, so fixing it improves every site at once. Problems found:

  1. Escape doesn't sync state. The keydown handler (~line 179) removes header.open, but leaves the burger at aria-expanded="true" / "Close menu" and doesn't return focus to the burger.
  2. Misused menu role. The "Sites" <details> dropdown uses role="menu" / role="menuitem" (~lines 116, 155) without the arrow-key handling that role requires, so screen readers announce a menu that doesn't behave like one. Plain links in a disclosure don't need these roles.
  3. No focus management for the mobile drawer. Opening it doesn't move focus into the drawer, and clicking outside doesn't close it.

What to do

  • On Escape, close the drawer through the same function the burger uses (updating aria-expanded and the label), and return focus to the burger (or to the summary for the Sites menu) if focus was inside.
  • Remove role="menu" and role="menuitem" from the Sites dropdown.
  • When the drawer opens, move focus to its first link; close it on an outside click.
  • Test with keyboard only, plus VoiceOver or NVDA, and describe the results in the PR.

Acceptance criteria

  • After Escape, aria-expanded is false and focus is on the burger.
  • axe reports no aria-required-children / role issues on design.alphaonelabs.com.
  • Behaviour is unchanged for mouse users.

Files

  • design-system/chrome.js
  • design-system/index.html (demo page)

Helpful links

Part of GSoC 2027 onboarding — see https://gsoc.alphaonelabs.com

Activity

  1. added
    good first issue
    gsoc-2027
    on Nov 2, 2026
  2. github-actions commented on Nov 2, 2026

    @github-actions
  3. reopened this on Nov 2, 2026
  4. added
    2026-11
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-11accessibilitygood first issuegsoc-2027project: design-system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions