-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Fabric] Implement announceForAccessibility in AccessibilityInfo Module #14995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fabric] Implement announceForAccessibility in AccessibilityInfo Module #14995
Conversation
e550b01 to
a61d12d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the announceForAccessibility function in the AccessibilityInfo module for Fabric architecture by integrating with the React Native Island's focus management system. The implementation uses UIA (UI Automation) notification events to provide accessibility announcements when the React Native island is focused.
Key Changes
- Adds Fabric-specific implementation for
announceForAccessibilityusing UIA notification events - Introduces a React property to track and access the ReactNativeIsland instance from native modules
- Sets up focus event handling to store the island reference in the React context when focused
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| AccessibilityInfoModule.cpp | Adds Fabric-specific announceForAccessibility implementation using UIA events |
| ReactNativeIsland.h | Declares static property method for ReactNativeIsland access |
| ReactNativeIsland.cpp | Implements property method and focus event handler to store island reference |
| react-native-windows-b93a8310-8489-4f09-8497-eb5807c505b9.json | Adds changelog entry for the new feature |
| react-native-windows-a7eded58-5a2a-479b-b48e-19ebcd5e6e2b.json | Removes unrelated changelog entry |
| @rnw-scripts-generate-release-notes-d4a4f9cb-19ee-4dac-a467-95b8a8365643.json | Removes unrelated changelog entry |
| @react-native-windows-cli-55399dd7-6f33-4e76-82c7-1832ffab3efa.json | Removes unrelated changelog entry |
change/react-native-windows-b93a8310-8489-4f09-8497-eb5807c505b9.json
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp
Outdated
Show resolved
Hide resolved
anupriya13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some nit comments rest changes looks good!
change/@react-native-windows-cli-55399dd7-6f33-4e76-82c7-1832ffab3efa.json
Show resolved
Hide resolved
change/@rnw-scripts-generate-release-notes-d4a4f9cb-19ee-4dac-a467-95b8a8365643.json
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp
Outdated
Show resolved
Hide resolved
…le (#14995) * Implementation of announce for accessibility for fabric * Build fix * Removed Debug Message * Yarn Change * Copilot Suggestions * Review Changes * Storing the weak_ref island in property to avoid circular ref * Adding deleted Change Files
…#15105) * [Fabric] Implement announceForAccessibility in AccessibilityInfo Module (#14995) * Implementation of announce for accessibility for fabric * Build fix * Removed Debug Message * Yarn Change * Copilot Suggestions * Review Changes * Storing the weak_ref island in property to avoid circular ref * Adding deleted Change Files * [Fabric] Raising UIA Event if Toggle State Changes in Switch Component (#15023) * Update Toggle State to Narrator * Yarn Change * Review Changes * Review Changes 2.0 * [Fabric] Fix for Text and TextInput focus issue with screen readers (#15088) * Few more implementation of TextRange Provider * Yarn change * Update Change file
Description
Type of Change
Why
To Support announceForAccessibility in Fabric
Resolves [ #14296 ]
What
In reactnativeisand we used a InputFocusController.GotFocus event , to listen to when the React Native island is focused. Then keeping track of that as property on the react context, to allow the native module to access it.
Screenshots
AnnounceForAccessibility.mp4
Optional: Tested in playground.
Changelog
Should this change be included in the release notes: yes
Support for announceForAccessibility in AccessibiltyInfo Module is added
Microsoft Reviewers: Open in CodeFlow