Skip to content

Commit bd379d2

Browse files
committed
feat: add a11y labels to buttons
1 parent 3987603 commit bd379d2

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/Date/CalendarHeader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function CalendarHeader({
4848
>
4949
<IconButton
5050
icon="chevron-left"
51+
accessibilityLabel="Previous"
5152
onPress={onPrev}
5253
// RN types bug
5354
hasTVPreferredFocus={undefined}
@@ -63,6 +64,7 @@ function CalendarHeader({
6364
>
6465
<IconButton
6566
icon="chevron-right"
67+
accessibilityLabel="Next"
6668
onPress={onNext}
6769
// RN types bug
6870
hasTVPreferredFocus={undefined}

src/Date/DatePickerModalContentHeader.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export default function DatePickerModalContentHeader(
7979
{allowEditing ? (
8080
<IconButton
8181
icon={collapsed ? 'pencil' : 'calendar'}
82+
accessibilityLabel={
83+
collapsed ? 'Type in date' : 'Pick date from calendar'
84+
}
8285
color={color}
8386
onPress={onToggle}
8487
// RN types bug

src/Date/DatePickerModalHeader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function DatePickerModalHeader(
3131
<Appbar style={styles.appbarHeader}>
3232
<Appbar.Action
3333
icon="close"
34+
accessibilityLabel="Close"
3435
onPress={props.onDismiss}
3536
color={color}
3637
testID="react-native-paper-dates-close"

0 commit comments

Comments
 (0)