2021年2月5日星期五

Is a role="group" valid under a role="tree"

Lets say I have an element with role="tree". Under that I have an element role="group" which contains elements with role="treeitem" or role="group" for multilevel tree.

<... role="tree">      <... role="group">          <... role="treeitem">          <... role="treeitem">          <... role="group">              <... role="treeitem">              <... role="treeitem">  

The issue here is that that the accessibility test tool is complaining that the element with role="tree" must contain a child element with role="treeitem".

Looked up the spec and it says

enter code here  Required Owned Elements:              group → treeitem          treeitem  

How do I interpret this? Should a tree contain a treeitem directly? could tree have a group which contains tree items but the tree has no direct children with role "treeitem"?

https://stackoverflow.com/questions/66072903/is-a-role-group-valid-under-a-role-tree February 06, 2021 at 10:03AM

没有评论:

发表评论