Skip to content

Commit

Permalink
feat: add prop accessibilityLabel to RadioButtonItem (#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunohkbx committed Jun 26, 2020
1 parent e070d86 commit d6c0c3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/RadioButton/RadioButtonItem.tsx
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -107,6 +111,7 @@ class RadioButtonItem extends React.Component<Props> {
uncheckedColor,
status,
theme: { colors },
accessibilityLabel,
} = this.props;

return (
Expand All @@ -124,6 +129,7 @@ class RadioButtonItem extends React.Component<Props> {
value,
})
}
accessibilityLabel={accessibilityLabel}
>
<View style={[styles.container, style]} pointerEvents="none">
<Text
Expand Down

0 comments on commit d6c0c3d

Please sign in to comment.