Skip to content

Commit 69003dd

Browse files
committed
feat: make more buttons accessible
1 parent bd379d2 commit 69003dd

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/Date/Day.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function Day(props: {
7373
styles.button,
7474
{ backgroundColor: inRange ? selectColor : undefined },
7575
]}
76+
accessibilityRole="button"
7677
// RN types bug
7778
hasTVPreferredFocus={undefined}
7879
tvParallaxProperties={undefined}

src/Date/Month.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
260260
<TouchableRipple
261261
disabled={!isHorizontal}
262262
onPress={isHorizontal ? () => onPressYear(year) : undefined}
263+
accessibilityRole="button"
264+
accessibilityLabel={`${monthName} ${year}`}
263265
style={[
264266
styles.yearButton,
265267
{

src/Date/YearPicker.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ function YearPure({
7474
<View style={styles.year}>
7575
<TouchableRipple
7676
onPress={() => onPressYear(year)}
77+
accessibilityRole="button"
78+
accessibilityLabel={String(year)}
7779
style={styles.yearButton}
7880
// RN types bug
7981
hasTVPreferredFocus={undefined}

0 commit comments

Comments
 (0)