Skip to content

bug(Mat-tree): No way to prevent keyboard navigation? #31357

Open
@boltex

Description

@boltex

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

17

Description

After upgrading from version 17 (where the keyboard navigation of mat-tree was left to the programmer) the new version (20) has integrated WAI/ARIA treeview standard keyboard navigation which conflicts with our own keyboard handling for tree navigation that we had in place.

Is there a way to turn off that newly added WAI/ARIA treeview keyboard navigation implementation?

Reproduction

StackBlitz link: There is no need for a stack blitz as this is just a feature that needs to be made optional /turned off in some cases.

Expected Behavior

The WAI/ARIA treeview standard keyboard navigation should be able to be turned off and let to the programmer's own methods if desired.

Actual Behavior

The treeview has double selections and doubles the expanding/contracting on different nodes when using the keyboard because the custom key handling that the programmer added is applied on top of the integrated WAI/ARIA treeview keyboard navigation handling.

Environment

  • Angular: 19.2.6
  • CDK/Material: 19.2.9
  • Browser(s): chrome 137.0.7151.104 (Official Build) (64-bit)
  • Operating System windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions