axe-core
axe-core copied to clipboard
fix(color-contrast): do not calculate contrast of elements inside closed details element
Closes issue: #3532
This currently breaks link-name rule if there is a link inside of a closed <details> element. We may need to do a different strategy or modify is-hidden to account for this as well since currently the link-name rule does not think any anchor elements inside closed details are hidden, then tries to run accessible name on the link which uses is-visible and returns an empty string since the text nodes are not visible.
Remember that <summary> remains visible even on closed <details> element.
We discussed this and the resolution is we'll update the is-hidden function to account for this. This means rules will not run against elements inside of a closed <details> elements and users will need to expand the details in order to get accessibility checks.
This work will be done after #3351 as part of the refactor in #3617. Going to close and make a new pr after the refactor is done.