New to KendoReactStart a free 30-day trial

Keyboard Navigation

Managing the Focus

The TreeView implements a roving tab index components strategy. On loading the TreeView, only the first node will contain tabindex="0" and the navigation keys will move the focus to other nodes and change the respective tabindex. When the focus is moved away from the TreeView, the tabindex="0" remains on the last focused node.

Keyboard Shortcuts

The TreeView supports the following keyboard shortcuts:

ShortcutBehavior
EnterSelects the focused tree view item when the selection mode is single or multiple. When the selection mode is multiple and there are other selected items, they get deselected.
SpaceChecks the checkbox of the TreeView node.
Up ArrowGoes to the previous tree node. The focus is moved to the previous node and its tabindex is set to 0.
Down ArrowGoes to the next tree node. The focus is moved to the next node and its tabindex is set to 0.
Left ArrowIf the node is expanded, collapses it and the focus remains on the item. If the node is collapsed, the focus is moved to its parent.
Right ArrowIf the node is collapsed, expands it and the focus remains on the item. If the node is expanded, the focus is moved to the first child node.
HomeMoves the focus to the first node in the tree without opening or closing a node.
EndMoves the focus to the last node in the tree that is focusable without opening a node.
Ctrl (or Cmd on Mac) + EnterSelects the focused item. When the item is already selected, it gets deselected.
Printable CharactersTyping M or any other printable character focuses the next or the first item in the list.

Resources

WAI-ARIA Authoring Practices: Treeview Pattern

WAI-ARIA Authoring Practices: Navigation Treeview

Change Theme
Theme
Loading ...

See Also