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

Consider making aria-treeitem-name a WCAG rule

Open WilcoFiers opened this issue 4 years ago • 2 comments

Currently elements with role=treeitem, without an accessible name are failed as a best practice, instead of a WCAG rule. The reason for that was to account for static treeitems. It is hard to argue that those are failures of WCAG.

Another way we could have done that, which is more involved, but I think I would prefer is to make it a WCAG rule, and flag static treeitems for review, so that:

<div role="treeitem">hello</div> <!-- pass -->
<div role="treeitem"></div> <!-- needs review -->
<div role="treeitem" tabindex="0"></div> <!-- violation; wcag2a, wcag412 -->

WilcoFiers avatar Jan 22 '21 17:01 WilcoFiers

When is an empty treeitem ok?

dylanb avatar Jan 25 '21 12:01 dylanb

There's nothing in WCAG that would fail an empty treeitem that is not focusable.

WilcoFiers avatar Apr 14 '21 16:04 WilcoFiers