-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Hello! 😊
After migrating from the deprecated treeControl to the new childrenAccessor input in MatTree, I noticed that keyboard navigation is no longer functioning as expected:
Arrow Key Navigation: Users can no longer navigate through the tree nodes using the arrow keys.
Toggle with Spacebar: Although the spacebar still toggles nodes, it behaves incorrectly by propagating the toggle action to parent nodes, which is not the desired behavior.
This regression is impacting the accessibility and usability of the tree component.
Reproduction
StackBlitz link: https://stackblitz.com/edit/5mkpfn-v3xvfh
Steps to reproduce:
- Try to use your left and arrow key after focusing the first tree : it just doesn't work
- Try to do the same on the second tree : it works
Expected Behavior
MatTree with childrenAccessor
or levelAccessor
input should works like before with TreeControl
Actual Behavior
Doesn't work when using the new childrenAccessor
or levelAccessor
input on MatTree
but it does when a TreeControl
(deprecated) is used instead
Environment
- Angular: 18.2.2
- CDK/Material: 18.2.2
- Browser(s): Chrome 128
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu