Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I distinguish between operable and non-operable elements in the tree? #3097

Open
JAWS-test opened this issue Aug 25, 2024 · 0 comments

Comments

@JAWS-test
Copy link

JAWS-test commented Aug 25, 2024

A treeitem always has two functions:

  • I can show and hide subordinate elements (with the arrow keys)
  • I can sometimes select or activate the treeitem (with Enter or Space)

How can I mark treeitems that do not have the second function? In the APG example the parent list items might not be linked. I can show this visually, but how do I communicate this programmatically? Certainly not with aria-disabled, because then the first function is also transmitted as deactivated.

The same applies to the entire tree

  • I can simply use the tree to display nested information,
  • the tree can also be a control element for selection or navigation.

Even at tree level, a programmatic distinction between a pure display element and a control element would make sense. Just as there is a distinction between selection lists (role=listbox) and lists (role=list) or between tables (role=table) and grids (role=grid).

The ARIA specification restricts the use of a tree to the selection of elements: "A widget that allows the user to select one or more items from a hierarchically organized collection." If this is the case, then the APG Navigation Treeview Example would not be permitted because it is not used for selection but for navigation. If a tree is really only used for selection, then my second question would be superfluous, but the first question still remains: How do I mark treeitems that I cannot select because they only serve to show and hide? Or can I only use trees if they are used for selection and I can also select each entry? But that would limit the applicability very much and then there would be a great need for an element with which I can also navigate or simply display nested content efficiently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant