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

Closed

Conversation

estevaolucas
Copy link

@estevaolucas estevaolucas commented Mar 14, 2019

Summary

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

Changelog

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 March 14, 2019 03:52
@pull-bot
Copy link

pull-bot commented Mar 14, 2019

Messages
📖

📋 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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 14, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

Copy link
Contributor

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

Choose a reason for hiding this comment

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

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

@react-native-bot
Copy link
Collaborator

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

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

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 15, 2019
@estevaolucas estevaolucas deleted the feat/more-ios-a11y-flags branch March 15, 2019 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: AccessibilityInfo CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants