Accessibility

24 Feb 20222 minutes to read

The TreeView control has been designed keeping in mind the WAI-ARIA specifications, and applies WAI-ARIA roles, states, and properties along with keyboard support. This control is characterized by complete keyboard interaction support and ARIA accessibility support that makes it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation.

ARIA attributes

The TreeView control uses the tree role, and each tree parent node has a group role where each node has treeitem role. The following ARIA attributes are used in TreeView:

Properties Functionalities
aria-multiselectable Indicates whether the TreeView enables multiple selection or not.
aria-expanded Indicates whether the parent node has expanded or not.
aria-selected Indicates the selected node.
aria-grabbed Indicates the selected state on drag-and-drop of node.
aria-level Indicates the level of node in TreeView.

Keyboard interaction

The TreeView functionalities can be interactive when keyboard shortcuts are used.

TreeView supports the following keyboard shortcuts.

Interaction Keys Description
Arrow Up Goes to the previous node.
Arrow Down Goes to the next node.
Arrow Right Expands the current node.
Arrow Left Collapses the current node.
Home Goes to the first node.
End Goes to the last node.
F2 Edits the focused node.
Esc Focuses out the edit state without saving the edited text.
Enter Selects the focused node/saves the edited text.
Space Checks the current node.
Ctrl + A Selects all nodes.