Skip to content
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

[iOS] [added] - add more iOS flags into AccessibilityInfo #23913



Copy link

@estevaolucas estevaolucas commented Mar 14, 2019


As a follow-up to this other PR #23839, it adds support for other, iOS only, flags into AccessibilityInfo.


It adds these other 4 methods:

  • isBoldTextEnabled()
  • isGrayscaleEnabled()
  • isInvertColorsEnabled()
  • isReduceTransparencyEnabled()

P.S: Android implementation for those methods just return false (with Promise.resolve(false))

And the corresponding event listeners:

  • boldTextChanged
  • grayscaleChanged,
  • invertColorsChanged,
  • reduceTransparencyChanged

Test Plan

isBoldTextEnabled and isReduceTransparencyEnabled can be tested on iOS Simulator, by enabling the respective flags in Settings > General > Accessibility

For isInvertColorsEnabled and isReduceTransparencyEnabled only on iOS device. iOS Simulator's accessibility is just a subset of device's one. To test those two flags:

  • Settings > General > Accessibility > Display Accommodations > Invert Colors > enable Smart Invert;
  • Settings > General > Accessibility > Display Accommodations > Color Filters > enable Color Filters;

Documentation PR: facebook/react-native-website#835

@estevaolucas estevaolucas requested a review from shergin as a code owner Mar 14, 2019
Copy link

@pull-bot pull-bot commented Mar 14, 2019


📋 Changelog Format - Did you include a Changelog? A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by 🚫 dangerJS against f25572c

cpojer approved these changes Mar 15, 2019
Copy link

@cpojer cpojer left a comment

Nice work, thank you!

Copy link

@facebook-github-bot facebook-github-bot left a comment

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link

@react-native-bot react-native-bot commented Mar 15, 2019

This pull request was successfully merged by @elucaswork in 40de049.

When will my fix make it into a release? | Upcoming Releases

@estevaolucas estevaolucas deleted the feat/more-ios-a11y-flags branch Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants