[0.85] Raise UIA events for selection changes - #16447
Open
anuagragith wants to merge 1 commit into
Open
anuagragith wants to merge 1 commit into
anuagragith wants to merge 1 commit into
Conversation
Notify UI Automation clients when accessibilityState.selected changes and raise SelectionItem events according to the container's selection mode and selected item count. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0f63ea4f-a16b-4fa3-b141-785aec89b5e4
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Selection events may not reach custom automation-provider wrappers.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Backports UI Automation selection-change notifications to the RNW 0.85 release line.
Changes:
- Raises selected-property and SelectionItem UIA events.
- Traverses mounted selection hierarchies.
- Adds tests, project integration, and changelog metadata.
File summaries
| File | Description |
|---|---|
vnext/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h |
Declares selection helpers. |
vnext/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp |
Implements selection traversal and event raising. |
vnext/Microsoft.ReactNative/Fabric/Composition/SelectionItemAutomationEvent.h |
Adds selection event logic. |
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp |
Emits UIA notifications on selection changes. |
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h |
Updates selection state handling. |
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp |
Computes current selections dynamically. |
vnext/Microsoft.ReactNative.IntegrationTests/UiaHelpersTests.cpp |
Tests selection behavior and event classification. |
vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters |
Adds test project filters. |
vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj |
Includes the new tests. |
change/react-native-windows-22b1e2a3-5ecc-4c5c-b127-e625595c8026.json |
Records the changelog entry. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1289
to
+1291
| if (m_innerAutomationProvider) { | ||
| winrt::Microsoft::ReactNative::implementation::RaiseSelectionItemAutomationEvent( | ||
| m_innerAutomationProvider.get(), newSelected.value_or(false)); |
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.
Description
Backports #16446 to .85-stable for the RNW 0.85 Gallery accessibility release.
Type of Change
Why
Narrator does not receive UI Automation notifications when �ccessibilityState.selected changes. The Gallery supplies the correct Selection/SelectionItem accessibility state, so the framework must emit the selected-property and SelectionItem events.
Resolves ADO 63972808 for the RNW 0.85 release line.
What
Clean cherry-pick of the main fix onto .85-stable.
Screenshots
Not applicable; this change affects UI Automation events.
Testing
The backport cherry-picked without conflicts. On the main fix, UiaHelpersTests.* passed 9/9, changed production translation units compiled, and formatting/diff checks passed.
Changelog
Yes.
Raise UI Automation selection events when �ccessibilityState.selected changes.
Microsoft Reviewers: Open in CodeFlow