-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make AccessibilityInfo.setAccessibilityFocus cross platform (#20229)
Summary: Currently, `AccessibilityInfo.setAccessibilityFocus` is only available on iOS. The same behaviour can be achieved on Android by dispatching the proper accessibility event. I implemented the same function for Android, to make life slightly more convenient for the developer. Today, developers must write something like this: ``` if (Platform.OS === 'ios') { AccessibilityInfo.setAccessibilityFocus(reactTag) } else { UIManager.sendAccessibilityEvent(reactTag, 8) } ``` With this change, the following is enough for both Android and iOS: ``` AccessibilityInfo.setAccessibilityFocus(reactTag) ``` Pull Request resolved: #20229 Differential Revision: D8874107 Pulled By: mdvacca fbshipit-source-id: a6ffd7bb89ce56d6d65b06419633a71dcf3d0733
- Loading branch information
1 parent
7ff7572
commit be715ec
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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