Skip to content
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

Bug: Anchor as menu item hijacks focus #1583

Closed
Jonas-C opened this issue Jun 10, 2024 · 2 comments
Closed

Bug: Anchor as menu item hijacks focus #1583

Jonas-C opened this issue Jun 10, 2024 · 2 comments

Comments

@Jonas-C
Copy link
Contributor

Jonas-C commented Jun 10, 2024

🐛 Bug report

If an anchor tag is included as one of the children (or grandchildren) of a menu, it automatically gains focus as the menu is opened. This messes up stuff like screen readers.

💥 Steps to reproduce

  1. Open the Codesandbox
  2. Open the menu
  3. Optionally, navigate to it with a screen reader.

💻 Link to reproduction

Codesandbox

🧐 Expected behavior

I'd like for the different states to be kept in sync, regardless of what the underlying menu item is.

🌍 System information

Software Version(s)
Zag Version 0.55.0
Browser Firefox, Chromium, Safari
Operating System MacOS
@Jonas-C Jonas-C closed this as completed Jun 10, 2024
@Jonas-C Jonas-C reopened this Jun 10, 2024
@Jonas-C
Copy link
Contributor Author

Jonas-C commented Jun 10, 2024

I thought this was a dupe, but it actually looks like a regression. Previous issue at #693

@segunadebayo
Copy link
Member

Good catch @Jonas-C.

I just pushed a fix for this. We'll release an update shortly.

If the issue persists after upgrading, I'll re-open it.

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

No branches or pull requests

2 participants