From fec11eaa3514e097431df4677b0754d361cded29 Mon Sep 17 00:00:00 2001 From: Bruno Castro Date: Fri, 29 May 2020 11:15:06 -0300 Subject: [PATCH] feat: add prop accessibilityLabel to RadioButtonItem --- src/components/RadioButton/RadioButtonItem.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/RadioButton/RadioButtonItem.tsx b/src/components/RadioButton/RadioButtonItem.tsx index b9cd890dd8..6c9d040a2a 100644 --- a/src/components/RadioButton/RadioButtonItem.tsx +++ b/src/components/RadioButton/RadioButtonItem.tsx @@ -31,6 +31,10 @@ export type Props = { * Function to execute on press. */ onPress?: () => void; + /** + * Accessibility label for the touchable. This is read by the screen reader when the user taps the touchable. + */ + accessibilityLabel?: string; /** * Custom color for unchecked radio. */ @@ -107,6 +111,7 @@ class RadioButtonItem extends React.Component { uncheckedColor, status, theme: { colors }, + accessibilityLabel, } = this.props; return ( @@ -124,6 +129,7 @@ class RadioButtonItem extends React.Component { value, }) } + accessibilityLabel={accessibilityLabel} >