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 authored and Trancever committed Jun 26, 2020
1 parent d6e9c3b commit 6ea81db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/RadioButton/RadioButtonItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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 @@ -106,6 +110,7 @@ class RadioButtonItem extends React.Component<Props> {
uncheckedColor,
status,
theme: { colors },
accessibilityLabel,
} = this.props;

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

0 comments on commit 6ea81db

Please sign in to comment.