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

Accessibility Audit: menu element has ARIA attributes that are not supported by its role (list): aria-expanded #32

Open
andrii-bodnar opened this issue Dec 18, 2024 · 2 comments

Comments

@andrii-bodnar
Copy link

Hello 👋

Thanks for this great project!

The built-in Astro Accessibility Audit (Dev Toolbar) complains about the <Dropdown> navbar component with the following message:

menu element has ARIA attributes that are not supported by its role (list): aria-expanded

Is this something that should be fixed on the library side or in the client code?

@surjithctly
Copy link
Owner

Can you open /node_modules/astro-navbar/src/components/Dropdown.astro file and add role="menu" to the <menu> tag and save the file? Now restart the server and see if the issue is fixed or not.

@andrii-bodnar
Copy link
Author

@surjithctly thanks for the quick reply!

I added the role="menu" attribute and now the warning changed:

Interactive ARIA role used on non-interactive HTML element.

Interactive roles should not be used to convert a non-interactive element to an interactive element

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