Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cdk/tree): add caveats for a11y support with treeControl, also document isExpandable #27939

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading