Skip to content

feat(Tree): Aria tree items should support separate expansion and selection #33468

Description

@nathonius

Feature Description

I'll refer to the multiselect example in the Aria docs: https://angular.dev/guide/aria/tree#multi-selection

Clicking on an item with children (a folder) both selects it and toggles its collapsed/expanded state. This behavior makes it very difficult to select an item inside a folder without also selecting the folder. To see the issue, attempt to select src/main.ts in the multiselect example without also selecting the src directory:

  1. Click src to open the src directory, which also selects the directory (not what I was trying to do)
  2. Click main.ts to select it
  3. Click src again to de-select it, which also collapses it (an extra step to accomplish what I was trying to do)
  4. Now main.ts is not visible, but is still selected. The only way to see that it is selected is to re-expand the src directory, which also selects it.

This is counterintuitive; there should be a way to select an item without also expanding its group and a way to expand a group without selecting it. This is possible using the keyboard (right/left arrow keys expand without selecting), but not a mouse.

Use Case

  1. A basic file explorer with multiselection.
  2. A select all / deselect all / some selected checkbox pattern for folders

Metadata

Metadata

Assignees

Labels

area: aria/treefeatureLabel used to distinguish feature request from other issuesgemini-triagedLabel noting that an issue has been triaged by gemini

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions