axe-core icon indicating copy to clipboard operation
axe-core copied to clipboard

fix(color-contrast): do not calculate contrast of elements inside closed details element

Open straker opened this issue 1 year ago • 3 comments

Closes issue: #3532

straker avatar Jul 25 '22 17:07 straker

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.

straker avatar Jul 25 '22 21:07 straker

Remember that <summary> remains visible even on closed <details> element.

wojtekmaj avatar Jul 27 '22 11:07 wojtekmaj

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.

straker avatar Aug 05 '22 15:08 straker

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.

straker avatar Aug 25 '22 21:08 straker