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

Generate ID / aria-controls in a way that doesn't result in potentially invalid attribute characters #12

Open
mrwweb opened this issue Nov 8, 2022 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@mrwweb
Copy link
Owner

mrwweb commented Nov 8, 2022

Right now, the way the ID for each submenu is generated can pull in special characters, probably including those that might be invalid. For example, here's one from a site I'm working on right now: exhibitions-|-collections-submenu. The solution is to either drop any characters other than numbers and letters or switch to something that is guaranteed to be unique. I just updated the script to ensure submenu IDs are unique per-menu (see #11), so I should probably switch to something that is also unique per-menu-item.

@mrwweb mrwweb added bug Something isn't working good first issue Good for newcomers labels Nov 8, 2022
@mrwweb mrwweb added this to the v1.3.0 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant