Skip to content

Commit

Permalink
feat(cdk/tree): add caveats for a11y support with treeControl, also…
Browse files Browse the repository at this point in the history
… document `isExpandable`.
  • Loading branch information
BobobUnicorn committed Oct 12, 2023
1 parent 14de86f commit 6ad6b91
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cdk/tree/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,15 @@ tree how to uniquely identify nodes to track how the data changes with each upda
The `<cdk-tree>` implements the [`tree` widget](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/),
including keyboard navigation and appropriate roles and ARIA attributes.

In order to use the new accessibility features, migrating to `levelAccessor` and `childrenAccessor`
is required. Trees using `treeControl` do not implement the correct accessibility features for
backwards compatibility.

#### isExpandable

In order for the tree to correctly determine whether or not a node is expandable, the `isExpandable`
property must be set on all `cdk-tree-node` or `cdk-tree-nested-node` that are expandable.

#### Activation actions

For trees with nodes that have actions upon activation or click, `<cdk-tree-node>` will emit
Expand Down
9 changes: 9 additions & 0 deletions src/material/tree/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ tree how to uniquely identify nodes to track how the data changes with each upda
The `<mat-tree>` implements the [`tree` widget](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/),
including keyboard navigation and appropriate roles and ARIA attributes.

In order to use the new accessibility features, migrating to `levelAccessor` and `childrenAccessor`
is required. Trees using `treeControl` do not implement the correct accessibility features for
backwards compatibility.

#### isExpandable

In order for the tree to correctly determine whether or not a node is expandable, the `isExpandable`
property must be set on all `mat-tree-node` or `mat-tree-nested-node` that are expandable.

#### Activation actions

For trees with nodes that have actions upon activation or click, `<mat-tree-node>` will emit
Expand Down

0 comments on commit 6ad6b91

Please sign in to comment.