Skip to content

Conversation

@graytmatterMS
Copy link

@graytmatterMS graytmatterMS commented Jun 16, 2020

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

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 am implementing several AccessibilityInfo properties and EvenListeners. This will allow a application to tell if several Accessible Display Options are enabled, or if they change.

Specifically this PR implements AccessibilityInfo.isInvertColorsEnabled AccessibilityInfo.isReduceMotionEnabled and AccessibilityInfo.isReduceTransparencyEnabled.

Changelog

[MacOS] [Added] - Implemented AccessibilityInfo.isInvertColorsEnabled, isReduceMotionEnabled, & isReduceTransparencyEnabled

Test Plan

  1. Run RNTester
  2. Go to the accessibility page
  3. Scroll to the Display Options Enabled section (second to last)
  4. Open Settings>Accessibility>Display
  5. Toggle Invert Colors, Reduce Motion, and Reduce Transparency.
  • You should see the text change back and forth between for example "Invert colors iss disabled" and "Invert colors is enabled"

Screen Shot 2020-06-16 at 14 51 12

Screen Shot 2020-06-16 at 14 50 41

Microsoft Reviewers: Open in CodeFlow

@graytmatterMS graytmatterMS requested a review from tom-un as a code owner June 16, 2020 22:58
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@tom-un
Copy link
Collaborator

tom-un commented Jun 17, 2020

Uh, oh. The macOS CI tests crashed in the AccessiblityExample LoadAllPages tests. https://dev.azure.com/ms/react-native/_build/results?buildId=88462&view=logs&j=628dfcdf-afa5-5702-e4da-dfa310a93062&t=65c699ef-104f-5f6e-4efa-350cb1662389.

You can run the test locally: Cmd+U to run all the test, then you can manually re-run the LoadAllPages tests by clicking the little run arrow on that test. The only guess I have as to why its crashing is because you're not unobserving the notification in the dealloc.

@ghost ghost removed the Needs: Author Feedback label Jun 17, 2020
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@ghost ghost removed the Needs: Author Feedback label Jun 18, 2020
@tom-un tom-un merged commit 84f277a into microsoft:master Jun 19, 2020
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.

3 participants