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

Support content-visibility:hidden in axe-core's visibility functions

Open WilcoFiers opened this issue 3 years ago • 1 comments

Content inside an element with content-visibility:hidden should be treated as hidden. This currently only works in Chrome, but we should make sure we're ready for this kind of change.

WilcoFiers avatar Sep 07 '22 15:09 WilcoFiers

This implementation would be a part of resolving #2768, we'll deal with 2768 later though.

WilcoFiers avatar Sep 07 '22 15:09 WilcoFiers

How do we want to classify the hidden state of this property (isVisibleOnScreen vs isHiddenForEveryone)? From https://web.dev/content-visibility/#a-note-on-accessibility it seems that it would be visible to the accessibility tree but not visible on screen. However, there's also the caveat that things with display: none would still be visible to screen readers since their styles aren't rendered (I haven't been able to test this as my JAWS version is 2 years behind).

straker avatar Sep 29 '22 22:09 straker

@straker , can you please confirm me the QA things on this ticket, Validated against latest axe-core develop branch code base - axe, <div id="target" aria-hidden="true">Sample</div> this is passing getting color-contrast issue in incomplete for <div id="target" style="content-visibility: hidden">contentExample</div>

Image

padmavemulapati avatar Oct 10 '22 12:10 padmavemulapati

As per Steve's input, content-visibility: hidden only applies to descendants of the node. It doesn't hide the node itself, so we need to make the target a descendant of the node with content-visibility: hidden When the content-visibility is hidden and aria-disabled then aria-hidden-focus is in inapplicable test script: `

contentExample
`

Image

padmavemulapati avatar Oct 11 '22 08:10 padmavemulapati