-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement AccessibilityInfo.announceForAccessibility for Fabric #14835
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
Implement AccessibilityInfo.announceForAccessibility for Fabric #14835
Conversation
|
@copilot Implement AccessibilityInfo.announceForAccessibility for Fabric |
…ity issue Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
…84f1 Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
run "yarn change" prerelease and then "yarn lint:fix" and then "yarn format" |
Completed all requested tasks: created prerelease changeset, ran lint:fix and format commands. Changes committed in b2215cd. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
| } | ||
|
|
||
| HRESULT hr = UiaRaiseNotificationEvent( | ||
| provider, |
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.
provider should be current control / button / element instead of the whole window.
The narrator is not announcing when I tested on playground even though the function returns S_OK, please fix this.
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.
Fixed the implementation to use the focused element instead of the whole window. Changed to use nullptr as the provider parameter which allows UIA to automatically target the currently focused element. This should resolve the issue with Narrator not announcing properly. Changes in commit a1c87b4.
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
a1c87b4 to
c32e240
Compare
|
/azp run |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 2 pipeline(s). |
f948ae7
into
user/aunverma/announceForAccessibility
Screenshot by Anupriya [Testing in Playground]
Problem
The
AccessibilityInfo.announceForAccessibilityAPI was completely non-functional in Fabric apps because the implementation was disabled whenUSE_FABRICwas defined. The existing code only supported XAML automation peers, which are not available in the Fabric renderer that uses Win32 UIA APIs.This blocked accessibility functionality in Fabric apps and prevented libraries like react-native-gallery from working properly.
Solution
Added a Win32 UIA-compatible implementation for Fabric using
UiaRaiseNotificationEvent():Key Features
UiaRaiseNotificationEvent()which works with Fabric's Win32 UIA infrastructureUiaClientsAreListening()check like other UIA implementationsTesting
The implementation enables existing test scenarios in RNTester and playground apps to work correctly in Fabric:
Fixes .
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
googlechromelabs.github.io/usr/local/bin/node install.mjs(dns block)https://api.github.com/repos/facebook/react-native/commits/42c8dead6/usr/local/bin/node /home/REDACTED/work/react-native-windows/react-native-windows/node_modules/jest/bin/jest.js --config /home/REDACTED/work/react-native-windows/react-native-windows/packages/@rnw-scripts/jest-e2e-config/jest.e2e.config.js --runInBand(http block)https://api.github.com/repos/facebook/react-native/commits/56cf99a96/usr/local/bin/node /home/REDACTED/work/react-native-windows/react-native-windows/node_modules/jest/bin/jest.js --config /home/REDACTED/work/react-native-windows/react-native-windows/packages/@rnw-scripts/jest-e2e-config/jest.e2e.config.js --runInBand(http block)https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/linux64/chrome-headless-shell-linux64.zip/usr/local/bin/node install.mjs(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.