Accessibility in Blazor TreeView Component

27 Mar 20244 minutes to read

The Blazor TreeView component has been designed keeping in mind the WAI-ARIA specifications, and applies WAI-ARIA roles, states, and properties along with keyboard support. This component 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.

The Blazor TreeView component followed 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 Blazor TreeView component is outlined below.

Accessibility Criteria Compatibility
WCAG 2.2 Support Yes
Section 508 Support Yes
Screen Reader Support Yes
Right-To-Left Support Yes
Color Contrast  
Mobile Device Support  
Keyboard Navigation Support Yes
Axe-core Accessibility Validation Yes
Yes - All features of the component meet the requirement.
Partial - Some features of the component do not meet the requirement.
No - The component does not meet the requirement.

WAI-ARIA attributes

The Blazor TreeView component followed the WAI-ARIA patterns to meet the accessibility. The following ARIA attributes are used in the TreeView component:

Attributes Purpose
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 Blazor TreeView component followed 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 component.

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 Blazor TreeView component’s accessibility levels are ensured through an axe-core software tool during automated testing.

The accessibility compliance of the TreeView component is shown in the following sample. Open the sample in a new window to evaluate the accessibility of the TreeView component with accessibility tools.

See also