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
I have tested the issue with the latest version of the product
Issue Description
Expectation
If the descendent of an element with required children is removed from the accessibility tree using display: none or visibility: hidden and also uses aria-hidden:"true" it should not raise an aria-required-children issue due to "Element has children which are not allowed".
Actual
If the descendent of an element with required children is removed from the accessibility tree using display: none or visibility: hidden and also uses aria-hidden:"true" it raises an aria-required-children issue due to "Element has children which are not allowed". If visibility: hidden is removed from the child element the aria-required-children issue is not raised.
How to Reproduce
In the following examples a child element uses display: none or visibility: hidden and also uses aria-hidden:"true". In these cases an aria-required-children issue is raised:
<divrole="table"><divrole="presentation"><divstyle="display: none;" aria-hidden="true">
this shouldn't be in the table
</div><divrole="row"><divrole="columnheader">Col 1</div><divrole="columnheader">Col 2</div></div></div><divrole="row"><divrole="cell">a</div><divrole="cell">b</div></div></div><divrole="list"><divrole="presentation"><divstyle="visibility: hidden;" aria-hidden="true">
this shouldn't be in the list
</div><li>item 1</li><li>item 2</li></div></div>
The following examples are exactly the same as the previous examples except aria-hidden:"true" is removed from the child elements. In these cases an aria-required-children issue is not raised:
<divrole="table"><divrole="presentation"><divstyle="display: none;">this shouldn't be in the table</div><divrole="row"><divrole="columnheader">Col 1</div><divrole="columnheader">Col 2</div></div></div><divrole="row"><divrole="cell">a</div><divrole="cell">b</div></div></div><divrole="list"><divrole="presentation"><divstyle="visibility: hidden;">this shouldn't be in the list</div><li>item 1</li><li>item 2</li></div></div>
Validated using latest axe-core develop branch code base.,
with <div style="display: none;" aria-hidden="true"> not seeing any failure for aria-required-children
Product
axe-core
Product Version
4.7.1
Latest Version
Issue Description
Expectation
If the descendent of an element with required children is removed from the accessibility tree using
display: none
orvisibility: hidden
and also usesaria-hidden:"true"
it should not raise an aria-required-children issue due to "Element has children which are not allowed".Actual
If the descendent of an element with required children is removed from the accessibility tree using
display: none
orvisibility: hidden
and also usesaria-hidden:"true"
it raises an aria-required-children issue due to "Element has children which are not allowed". Ifvisibility: hidden
is removed from the child element the aria-required-children issue is not raised.How to Reproduce
In the following examples a child element uses
display: none
orvisibility: hidden
and also usesaria-hidden:"true"
. In these cases an aria-required-children issue is raised:The following examples are exactly the same as the previous examples except
aria-hidden:"true"
is removed from the child elements. In these cases an aria-required-children issue is not raised:See Live examples
Additional context
This provided examples in the "How to reproduce" section are simplified examples of issues originally encountered when evaluating this complex grid.
The text was updated successfully, but these errors were encountered: