You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting and providing the reproduction! The problem is related to. aria-expanded being set on the label element, which doesn't match it's role, and was introduced in f8f44f5 to solve #4804. I check how we can improve the situation.
Okay, I believe I found a better solution in 148c9fd, at least Lighthouse stopped complaining. Prior to this change, the label element hosted the aria-expanded attribute, which is semantically not correct, since the label itself cannot be expanded. However, the label triggers the expansion of the subsequent nav element, which is why I've linked the nav element to the label using aria-labelledby, and set the aria-expanded attribute on this element.
This fixes the issue described. I've also fixed an issue where the aria-expanded state was only triggered when hitting Enter when thelabel is focused, not when clicking. Now, the attribute is also updated when clicking on the label.
Context
No response
Bug description
Seems to be an issue with [aria-*] attributes not matching their roles. I found this bug when running Chrome's Lighthouse feature.
Seems to be an issue with the nav
Was able to reproduce this error on a reproduction after adding the following to mkdocs.yml
Also will mention i'm using the latest version of insiders 4.29.0
Related links
Reproduction
example.zip
Steps to reproduce
Browser
Chrome
Before submitting
The text was updated successfully, but these errors were encountered: