Accessibility in EJ2 TypeScript TreeView
4 Sep 20265 minutes to read
The TreeView control follows the accessibility guidelines and standards, including ADA, Section 508, WCAG 2.2 standards, and WCAG roles that are commonly used to evaluate accessibility.
The accessibility compliance for the TreeView control is outlined below.
| Accessibility Criteria | Compatibility |
|---|---|
| WCAG 2.2 Support | ![]() |
| Section 508 Support | ![]() |
| Screen Reader Support | ![]() |
| Right-To-Left Support | ![]() |
| Color Contrast | ![]() |
| Mobile Device Support | ![]() |
| Keyboard Navigation Support | ![]() |
| Accessibility Checker Validation | ![]() |
| Axe-core Accessibility Validation | ![]() |
- All features of the control meet the requirement.
- Some features of the control do not meet the requirement.
- The control does not meet the requirement.WAI-ARIA attributes
The TreeView control follows the WAI-ARIA patterns to ensure accessibility. The following ARIA attributes are used in the TreeView control:
| Attributes | Purpose |
|---|---|
role=tree |
Specifies the role of the element as a tree that contains the tree items. |
role=treeitem |
Specifies the role of each node within the tree. |
role=group |
Specifies the role of each parent node container. |
role=checkbox |
Indicates the checkbox control within a tree item element. |
aria-multiselectable |
Indicates whether the TreeView enables multiple selection or not. |
aria-expanded |
Indicates whether the parent node is expanded or collapsed. |
aria-selected |
Indicates whether a node is selected. |
aria-grabbed |
Indicates the grabbed (selected for drag) state during drag-and-drop of a node. |
aria-level |
Indicates the level of a node in the TreeView. |
aria-checked |
Indicates the current checked state of a TreeView checkbox. |
aria-label |
Provides an accessible name for the TreeView checkbox. |
aria-activedescendant |
Identifies the currently active element when focusing on the TreeView. |
aria-disabled |
Indicates that the element is perceivable but disabled. |
Keyboard interaction
The TreeView control follows the keyboard interaction guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the TreeView control.
| 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. |
Ensuring accessibility
The TreeView control’s accessibility levels are ensured through an accessibility-checker and axe-core software tools during automated testing.
The accessibility compliance of the TreeView control is shown in the following sample. Open the sample in a new window to evaluate the accessibility of the TreeView control with accessibility tools.