Adds AccessibilityInfo.isScreenReaderEnabled to RN MacOS#444
Merged
tom-un merged 17 commits intomicrosoft:masterfrom Jun 11, 2020
Merged
Adds AccessibilityInfo.isScreenReaderEnabled to RN MacOS#444tom-un merged 17 commits intomicrosoft:masterfrom
tom-un merged 17 commits intomicrosoft:masterfrom
Conversation
analysis-bot
suggested changes
Jun 10, 2020
analysis-bot
left a comment
There was a problem hiding this comment.
Code analysis results:
eslintfound some issues. Runyarn lint --fixto automatically fix problems.
Libraries/Components/AccessibilityInfo/AccessibilityInfo.macos.js
Outdated
Show resolved
Hide resolved
tom-un
reviewed
Jun 10, 2020
Collaborator
|
There are some Flow errors being reported in the CI. Locally, run |
tom-un
reviewed
Jun 10, 2020
tom-un
reviewed
Jun 10, 2020
tom-un
reviewed
Jun 10, 2020
tom-un
requested changes
Jun 10, 2020
Collaborator
tom-un
left a comment
There was a problem hiding this comment.
Thanks! Made some minor change requests and there's a couple things you'll need to change to pass CI.
Collaborator
|
Oh, bonus: now that we're not compiling the iOS version of RCTAccessilibytManager.m please remove the |
tido64
reviewed
Jun 10, 2020
Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
tom-un
reviewed
Jun 10, 2020
| @@ -56,7 +69,13 @@ const AccessibilityInfo = { | |||
| * Android and iOS only | |||
Collaborator
There was a problem hiding this comment.
This comment now needs to be updated.
You could copy the comment from the .ios.js or .android.js version.
…m/graytmatterMS/react-native-macos into matgray/a11yInfo-voiceOver-enable
tom-un
approved these changes
Jun 11, 2020
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.
Please select one of the following
Summary
When the MacOS fork was made all the AccessibilityInfo functionality was stubbed out because the iOS Accessibility APIs are different from the MacOS APIs. I've filled back out the functionality for isScreenReaderEnabled, and the corresponding event screenReaderChanged.
Previously the Native side implementation of the AccessibilityManager was surrounded by a big ifdef to make sure it was only actually implemented for the supported iOS platform. I've now forked the file so it has a MacOS version. This currently only exports the one method and the one event-listener, but that will change as more features are requested.
Changelog
[MacOS] [Added] - Implemented AccessibilityInfo.isScreenReaderEnabled and screenReaderChanged
Test Plan
Microsoft Reviewers: Open in CodeFlow