Skip to content

Commit 6ea81db

Browse files
brunohkbxTrancever
authored andcommitted
feat: add prop accessibilityLabel to RadioButtonItem (#1955)
1 parent d6e9c3b commit 6ea81db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/RadioButton/RadioButtonItem.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export type Props = {
3030
* Function to execute on press.
3131
*/
3232
onPress?: () => void;
33+
/**
34+
* Accessibility label for the touchable. This is read by the screen reader when the user taps the touchable.
35+
*/
36+
accessibilityLabel?: string;
3337
/**
3438
* Custom color for unchecked radio.
3539
*/
@@ -106,6 +110,7 @@ class RadioButtonItem extends React.Component<Props> {
106110
uncheckedColor,
107111
status,
108112
theme: { colors },
113+
accessibilityLabel,
109114
} = this.props;
110115

111116
return (
@@ -123,6 +128,7 @@ class RadioButtonItem extends React.Component<Props> {
123128
value,
124129
})
125130
}
131+
accessibilityLabel={accessibilityLabel}
126132
>
127133
<View style={[styles.container, style]} pointerEvents="none">
128134
<Text

0 commit comments

Comments
 (0)