Skip to content

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

Open
Ferryx349 wants to merge 1 commit 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 1 commit 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

⚠️ No Changeset found

Latest commit: 4a39c70

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a 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.

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.

3 participants