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

[role]s are not contained by their required parent element #4554

Closed
crimsoniv0j opened this issue Aug 6, 2024 · 2 comments
Closed

[role]s are not contained by their required parent element #4554

crimsoniv0j opened this issue Aug 6, 2024 · 2 comments
Labels

Comments

@crimsoniv0j
Copy link

Product

axe-core

Question

Please help me to fix this.
Screenshot 2024-08-06 224611
And this is my blog HTML
Screenshot 2024-08-06 224659

@crimsoniv0j crimsoniv0j added question ungroomed Ticket needs a maintainer to prioritize and label labels Aug 6, 2024
@straker
Copy link
Contributor

straker commented Aug 6, 2024

Thanks for the question. At first glance it would seem the issue is with the <li> that is in between the parent ul[role=menubar] element and the a[role=menuitem] element. The <li> will retain it's inherit role of listitem which is not allowed as a parent to a menuitem. You should be able to fix it by adding role=none to the <li>.

@straker straker removed the ungroomed Ticket needs a maintainer to prioritize and label label Aug 6, 2024
@crimsoniv0j
Copy link
Author

Thanks for the question. At first glance it would seem the issue is with the <li> that is in between the parent ul[role=menubar] element and the a[role=menuitem] element. The <li> will retain it's inherit role of listitem which is not allowed as a parent to a menuitem. You should be able to fix it by adding role=none to the <li>.

Thank you very much! Now, it's all good!

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

No branches or pull requests

2 participants