ARIA Tree
The ARIA Tree provides an accessible tree view component for displaying hierarchical data following WAI-ARIA patterns.Installation
Components
Tree
The main tree container. Selector:[ngTree]
Source: /home/daytona/workspace/source/src/aria/tree/tree.ts
Inputs
multiselectable(boolean) - Whether multiple tree items can be selecteddisabled(boolean) - Whether the tree is disabled
TreeItem
An individual node in the tree. Selector:[ngTreeItem]
Inputs
value- The value associated with this tree itemexpanded(boolean) - Whether this item is expanded (for parent items)disabled(boolean) - Whether this item is disabledlevel(number) - The nesting level of this item
TreeItemGroup
A group of child tree items. Selector:[ngTreeItemGroup]
Basic Usage
Multi-Level Tree
Multi-Select Tree
Keyboard Navigation
- Arrow Up/Down - Navigate between visible tree items
- Arrow Right - Expand focused item (if collapsed) or move to first child
- Arrow Left - Collapse focused item (if expanded) or move to parent
- Enter/Space - Toggle selection or activate item
- Home - Focus first tree item
- End - Focus last visible tree item
- Type characters - Jump to matching tree item
- * - Expand all siblings at the same level
Multi-Select
- Shift+Arrow - Extend selection
- Ctrl+Arrow - Move focus without changing selection
- Ctrl+Space - Toggle selection of focused item
Accessibility Features
- Implements ARIA tree pattern
role="tree"on containerrole="treeitem"on itemsrole="group"on item groupsaria-expandedfor expandable itemsaria-selectedfor selected itemsaria-levelfor nesting deptharia-setsizeandaria-posinsetfor position infoaria-multiselectablefor multi-select trees- Full keyboard navigation
- Screen reader announcements
Use Cases
- File system browsers
- Organization charts
- Navigation menus
- Category browsers
- Site maps
- Folder structures
- Hierarchical data visualization