Skip to content

fix(admin): update aria-expanded and label when mobile menu is toggled - #714

Open
Ferryx349 wants to merge 3 commits into
mainfrom
fix/a11y-menu-toggle-aria-expanded
Open

fix(admin): update aria-expanded and label when mobile menu is toggled#714
Ferryx349 wants to merge 3 commits into
mainfrom
fix/a11y-menu-toggle-aria-expanded

Conversation

@Ferryx349

Copy link
Copy Markdown
Collaborator

Description

This PR updates aria-expanded (true / false) and dynamic aria-label (Open navigation / Close navigation) on #menu-toggle inside setNavOpen() so screen readers receive real-time navigation drawer state changes.

Related Issue

Closes:- #712.

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f019688

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves admin dashboard accessibility and keyboard handling by updating ARIA attributes on the mobile navigation toggle and refining which keypresses trigger global shortcuts.

Changes:

  • Update #menu-toggle to dynamically reflect drawer state via aria-expanded and a stateful aria-label in setNavOpen().
  • Treat <select> elements as “typing targets” to avoid triggering global shortcuts while interacting with form controls.
  • Ignore global shortcut handling when modifier keys (Meta/Ctrl/Alt) are pressed to prevent unintended actions (e.g., browser/system shortcuts).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Anshumancanrock Anshumancanrock left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants