Skip to content

[0.85] Raise UIA events for selection changes - #16447

Open
anuagragith wants to merge 1 commit into
microsoft:0.85-stablefrom
anuagragith:fix/selection-item-automation-events-0.85
Open

anuagragith wants to merge 1 commit into
microsoft:0.85-stablefrom
anuagragith:fix/selection-item-automation-events-0.85

Conversation

@anuagragith

@anuagragith anuagragith commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Description

Backports #16446 to .85-stable for the RNW 0.85 Gallery accessibility release.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

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

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
Copilot AI balanced review requested due to automatic review settings September 16, 2026 23:41
@anuagragith
anuagragith requested a review from a team as a code owner September 16, 2026 23:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants