diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index f0b1280e60..294eee61e6 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -24,6 +24,7 @@ // Theo Henry de Villeneuve // Eli White // Romain Faust +// Be Birchall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -2009,10 +2010,39 @@ export interface AccessibilityProps extends AccessibilityPropsAndroid, Accessibi } export type AccessibilityActionInfo = Readonly<{ - name: string; + name: AccessibilityActionName; label?: string; }>; +export type AccessibilityActionName = + /** + * Generated when a screen reader user double taps the component. + */ + | 'activate' + /** + * Gererated when a screen reader user increments an adjustable component. + */ + | 'increment' + /** + * Gererated when a screen reader user decrements an adjustable component. + */ + | 'decrement' + /** + * Generated when a TalkBack user places accessibility focus on the component and double taps and holds one finger on the screen. + * @platform android + */ + | 'longpress' + /** + * Generated when a VoiceOver user places focus on or inside the component and double taps with two fingers. + * @platform ios + * */ + | 'magicTap' + /** + * Generated when a VoiceOver user places focus on or inside the component and performs a two finger scrub gesture (left, right, left). + * @platform ios + * */ + | 'escape'; + export type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string;