Accessibility · Library v2.7.1

Tree Accessibility Overview

Tree provides expandable nodes, labeled selection checkboxes and a named tree container. Visible nodes, including leaves, share one roving tab stop.

Keyboard interaction

Tree keyboard behavior
KeyAction
Tab / Shift+TabEnter or leave the tree at its active node.
EnterToggle expansion of the focused parent node.
SpaceToggle selection when checkboxes are enabled; otherwise toggle expansion.
Right / LeftExpand or enter children; collapse or move to the parent.
Up / Down; Home / EndMove through visible nodes, including leaves, or to either boundary.
Printable charactersFind the next matching visible label.

In your application

  • Set i18n.treeLabel to describe the hierarchy.
  • Use clear node labels and retain stable node objects when updating the tree.

Keep focus indicators visible, check contrast with your theme, and test at browser zoom. Try the component examples using only a keyboard.

Current limitations

  • Applications should test focus when replacing or externally collapsing nodes while a descendant is focused.
  • Selection uses native checkboxes; do not assume aria-selected or cascading selection on tree items.

This reference is based on the shipped source. It is not a WCAG conformance certificate or a claim that every browser and screen reader combination has been tested.

Compare your workflow with the W3C authoring pattern. The pattern describes the target interaction, not a guarantee of current component support.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.