From 98974cc1f62edaff3f937065cadc9d13065bfbdf Mon Sep 17 00:00:00 2001 From: Jesse Katsumata Date: Mon, 24 Feb 2020 22:16:45 +0900 Subject: [PATCH] react-native: add onAccessibilityEscape prop (#42562) * react-native: add onAccessibilityEscape prop * react-native: reorder props * chore: apply lint to tests --- types/react-native/index.d.ts | 6 ++++++ types/react-native/test/index.tsx | 2 ++ 2 files changed, 8 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 50c7712ecf..d29e27f7c8 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -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 diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index ce2046dfe6..044052053d 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -861,6 +861,8 @@ class AccessibilityTest extends React.Component { accessibilityStates={["selected"]} accessibilityState={{checked: true}} accessibilityHint="Very importent header" + onMagicTap={() => {}} + onAccessibilityEscape={() => {}} > Text