Skip to content

fix(menu): correctly identify menu item link with same URL as web page #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ze-flo
Copy link
Contributor

@ze-flo ze-flo commented Apr 23, 2025

Description

useMenu correctly identifies the menu item link with the same URL as the current web page.

Detail

  • getItemProps sets aria-current="page" to the menu item link with the same URL as the current web page.
  • Disabled menu item links to not get unnecessary target and ref attributes.

Checklist

  • 🌐 demo is up-to-date (npm start)
  • 💂‍♂️ includes new unit tests
  • ♿ tested for WCAG 2.1 AA compliance
  • 📝 tested in Chrome, Firefox, Safari, and Edge

@ze-flo ze-flo requested a review from a team as a code owner April 23, 2025 23:37
@coveralls
Copy link

Coverage Status

coverage: 94.97% (+0.04%) from 94.934%
when pulling a5c22a9 on ze-flo/menu-aria-current
into a79dac8 on main.

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

Successfully merging this pull request may close these issues.

3 participants