fix(react-tree): expose tree selection control to assistive technologies - #36384
Merged
PaulGMardling merged 15 commits intoJul 22, 2026
Merged
Conversation
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
PaulGMardling
force-pushed
the
fix/a11y-tree-selection
branch
from
July 10, 2026 12:40
a4b0786 to
7574e86
Compare
PaulGMardling
marked this pull request as ready for review
July 10, 2026 13:35
PaulGMardling
force-pushed
the
fix/a11y-tree-selection
branch
3 times, most recently
from
July 15, 2026 15:06
67743cc to
823bdbb
Compare
Victor Genaev (mainframev)
approved these changes
Jul 17, 2026
PaulGMardling
force-pushed
the
fix/a11y-tree-selection
branch
from
July 17, 2026 12:53
4d5ed51 to
e7c44a7
Compare
Bernardo Sunderhus (bsunderhus)
requested changes
Jul 20, 2026
Bernardo Sunderhus (bsunderhus)
left a comment
Contributor
There was a problem hiding this comment.
Avoid mutations after the slot declaration, instead conditionally declare what you want. defaultProps should be enough for your usage here, let me know if it's not
Bernardo Sunderhus (bsunderhus)
approved these changes
Jul 22, 2026
PaulGMardling
force-pushed
the
fix/a11y-tree-selection
branch
2 times, most recently
from
July 22, 2026 08:37
d2c4763 to
32be26d
Compare
…03.json Co-authored-by: Victor Genaev <vgenaev@gmail.com>
Pass `ref` and `onBlur` to the actions slot as defaultProps during construction, rather than mutating the slot after creation. This follows Fluent UI best practices and addresses the code review feedback from @bsunderhus. Removed post-construction mutations on the actions slot and moved callback creation before slot initialization.
Pass `ref`, `onBlur`, and other props to both the `expandIcon` and `actions` slots as defaultProps during construction, rather than mutating the slots after creation. This eliminates the post-construction mutation pattern and follows Fluent UI best practices, addressing the code review feedback from @bsunderhus.
…edby Pass selector props during slot construction instead of mutating after. Preserve the conditional logic: only set aria-labelledby if the consumer didn't provide aria-label or aria-labelledby. Also set mainSlot.id unconditionally during construction. Update snapshots to reflect the id being added to the main slot.
…eeItemLayout/useTreeItemLayout.tsx Co-authored-by: Bernardo Sunderhus <bernardo.sunderhus@gmail.com>
PaulGMardling
force-pushed
the
fix/a11y-tree-selection
branch
from
July 22, 2026 08:38
32be26d to
6e34369
Compare
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.


Previous Behavior
Voice access users are unable to access selection tree controls.
New Behavior
The Tree selection control (a checkbox in multiselect, a radio in single-select) now participates in the accessibility tree with an accessible name derived from the item's content. Previously it was hidden from assistive technologies, leaving any tool that operates the visible control directly unable to reach it.
Although the issue was reported against Windows Voice Access, the gap was platform-agnostic and equally affected macOS Voice Control and comparable technologies. Exposing the control resolves it at the source: the selector is now discoverable and operable by assistive technologies across platforms.
Selection state remains on the tree item via aria-checked / aria-selected, so screen readers announce it once (no double-announcement), and keyboard behavior is unchanged (the selector stays tabIndex -1; Space toggles). The fix applies to both the standard tree item layout and the persona tree item layout.
Testing/Verification
Windows 11:
Voice Access — "Show numbers" now places a number on each selection control; saying that number toggles selection, and "Click (item name)" works, confirming the accessible name resolves.
Narrator — selection state is announced once (no double-announcement); the row and the checkbox are both reachable as expected.
macOS (supplementary proxy):
Voice Control number-targeting toggles selection; VoiceOver reads the state once (no doubling). The browser accessibility tree confirms the control is exposed with the correct name.
Automated:
Added unit regression tests asserting the selection control is exposed (found by role) and named; verified they fail if the fix is reverted.
Fixes #36260