Make tree view expansion a marker component - #25835
Merged
alice-i-cecile merged 1 commit intoSep 20, 2026
Merged
Conversation
jbuehler23
force-pushed
the
jackdaw/tree-expanded-marker
branch
from
September 18, 2026 07:41
7b9597b to
5d10fa5
Compare
viridia
approved these changes
Sep 18, 2026
Zeophlite
approved these changes
Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Follow-up to #25821 addressing viridia's review. Expansion was a bool on the row, so nothing could feed it to the accessibility tree. As a marker component, like checked state, a hook can keep the accesskit expanded property in sync.
Part of #23013.
Solution
Added expandable and expanded markers to the ui crate's interaction states, next to the checked ones, with matching hooks that set or clear the accessibility property. The tree view reads the marker instead of a field and the self update observer inserts or removes it. Rows with children are marked expandable by the widget's post update pass, so leaf rows never report a collapsed state.
The expand request event keeps its bool payload since it is a request, not state.
AI disclosure
AI assistance was used to help port these changes and to plan this upstream series from our existing Jackdaw functionality. All changes were reviewed by a human before submission.