From 5e88c982b65656707d5f0e7234947c0458aa7f83 Mon Sep 17 00:00:00 2001 From: Jacques de Villiers Date: Thu, 4 Nov 2021 00:54:26 +0000 Subject: [PATCH] Add Accessibility Label to PhoneInput --- src/PhoneInput.tsx | 7 ++++++- src/typings/index.d.ts | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PhoneInput.tsx b/src/PhoneInput.tsx index 662c4d0..7bde6ee 100644 --- a/src/PhoneInput.tsx +++ b/src/PhoneInput.tsx @@ -27,7 +27,7 @@ export default class PhoneInput { this.inputPhone = ref; }} + accessibilityLabel={this.getAccessibilityLabel()} editable={!disabled} autoCorrect={false} style={[styles.text, this.props.textStyle]} diff --git a/src/typings/index.d.ts b/src/typings/index.d.ts index 5e1fa41..defedae 100644 --- a/src/typings/index.d.ts +++ b/src/typings/index.d.ts @@ -54,6 +54,10 @@ export interface ReactNativeCountryPickerState { } export interface ReactNativePhoneInputProps { + /** + * Override accessibility label for telephone input + */ + accessibilityLabel?: string; /** * Format input while typing */