mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Added Accessibility Feature for RN to support Smart Inversion for photos
Summary:
@public
Added a property `accessibilityIgnoresInvertColors (boolean)` to Views which allows the Apple API `accessibilityIgnoresInvertColors` to be used in React Native.
Now, when a user has Display: Smart Invert enabled, you can set the property to be true, and things like photos and views with the property set to true will no longer be inverted when Smart Invert is enabled.
This property can also be applied to the Image Component.
Example Use Case:
```
<Image accessibilityIgnoresInvertColors={true} />
```
```
<View accessibilityIgnoresInvertColors={true} />
```
| Before | After |
| ------ | ----- |
|  | 
Reviewed By: PeteTheHeat
Differential Revision: D8549084
fbshipit-source-id: 82a3bc73c9e6d75d6b50ba013b88127f07692641
This commit is contained in:
committed by
Facebook Github Bot
parent
20a8673b48
commit
af226078e7
@@ -87,6 +87,7 @@ export type ViewProps = $ReadOnly<{|
|
||||
accessibilityComponentType?: AccessibilityComponentType,
|
||||
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive',
|
||||
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants',
|
||||
accessibilityIgnoresInvertColors?: boolean,
|
||||
accessibilityTraits?: AccessibilityTrait | Array<AccessibilityTrait>,
|
||||
accessibilityViewIsModal?: boolean,
|
||||
accessibilityElementsHidden?: boolean,
|
||||
|
||||
Reference in New Issue
Block a user