You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- add more iOS flags into AccessibilityInfo (#23913)
Summary:
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`
Pull Request resolved: #23913
Differential Revision: D14482214
Pulled By: cpojer
fbshipit-source-id: b97725fd12706957d4dad880a97e6b0993738272
@@ -40,16 +50,72 @@ const _subscriptions = new Map();
40
50
*/
41
51
constAccessibilityInfo={
42
52
/**
43
-
* Query whether a reduce motion is currently enabled.
53
+
* Query whether bold text is currently enabled.
54
+
*
55
+
* Returns a promise which resolves to a boolean.
56
+
* The result is `true` when bold text is enabled and `false` otherwise.
57
+
*
58
+
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html#isBoldTextEnabled
* The result is `true` when grayscale is enabled and `false` otherwise.
71
+
*
72
+
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html#isGrayscaleEnabled
* Query whether inverted colors are currently enabled.
82
+
*
83
+
* Returns a promise which resolves to a boolean.
84
+
* The result is `true` when invert color is enabled and `false` otherwise.
85
+
*
86
+
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html#isInvertColorsEnabled
* Query whether reduced motion is currently enabled.
44
96
*
45
97
* Returns a promise which resolves to a boolean.
46
-
* The result is `true` when a screen reader is enabledand `false` otherwise.
98
+
* The result is `true` when a reduce motion is enabled and `false` otherwise.
47
99
*
48
100
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html#isReduceMotionEnabled
* Query whether reduced transparency is currently enabled.
110
+
*
111
+
* Returns a promise which resolves to a boolean.
112
+
* The result is `true` when a reduce transparency is enabled and `false` otherwise.
113
+
*
114
+
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html#isReduceTransparencyEnabled
* See http://facebook.github.io/react-native/docs/accessibilityinfo.html#isScreenReaderEnabled
0 commit comments