react-native: add onAccessibilityEscape prop (#42562)

* react-native: add onAccessibilityEscape prop

* react-native: reorder props

* chore: apply lint to tests
This commit is contained in:
Jesse Katsumata
2020-02-24 14:16:45 +01:00
committed by GitHub
parent e32d4f0292
commit 98974cc1f6
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -2215,6 +2215,12 @@ export interface AccessibilityPropsIOS {
*/
accessibilityViewIsModal?: boolean;
/**
* When accessibile is true, the system will invoke this function when the user performs the escape gesture (scrub with two fingers).
* @platform ios
*/
onAccessibilityEscape?: () => void;
/**
* When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture.
* @platform ios
+2
View File
@@ -861,6 +861,8 @@ class AccessibilityTest extends React.Component {
accessibilityStates={["selected"]}
accessibilityState={{checked: true}}
accessibilityHint="Very importent header"
onMagicTap={() => {}}
onAccessibilityEscape={() => {}}
>
<Text accessibilityTraits={["key", "text"]} accessibilityIgnoresInvertColors>
Text