diff --git a/src/Date/CalendarHeader.tsx b/src/Date/CalendarHeader.tsx index 2cc4e174..f27fcbad 100644 --- a/src/Date/CalendarHeader.tsx +++ b/src/Date/CalendarHeader.tsx @@ -3,6 +3,7 @@ import { StyleSheet, View } from 'react-native' import { IconButton, useTheme } from 'react-native-paper' import DayNames, { dayNamesHeight } from './DayNames' import type { DisableWeekDaysType } from './dateUtils' +import { getTranslation } from '../translations/utils' const buttonContainerHeight = 56 const buttonContainerMarginTop = 4 @@ -48,6 +49,7 @@ function CalendarHeader({ > onPressYear(year) : undefined} + accessibilityRole="button" + accessibilityLabel={`${monthName} ${year}`} style={[ styles.yearButton, { diff --git a/src/Date/YearPicker.tsx b/src/Date/YearPicker.tsx index 55790b82..1f8cbe38 100644 --- a/src/Date/YearPicker.tsx +++ b/src/Date/YearPicker.tsx @@ -74,6 +74,8 @@ function YearPure({ onPressYear(year)} + accessibilityRole="button" + accessibilityLabel={String(year)} style={styles.yearButton} // RN types bug hasTVPreferredFocus={undefined} diff --git a/src/translations/en.ts b/src/translations/en.ts index 77f36d6b..50278a48 100644 --- a/src/translations/en.ts +++ b/src/translations/en.ts @@ -11,5 +11,10 @@ const en: TranslationsType = { mustBeLowerThan: 'Must be earlier then', mustBeBetween: 'Must be between', dateIsDisabled: 'Day is not allowed', + previous: 'Previous', + next: 'Next', + typeInDate: 'Type in date', + pickDateFromCalendar: 'Pick date from calendar', + close: 'Close', } export default en diff --git a/src/translations/enGB.ts b/src/translations/enGB.ts index 9c65a159..90cb72d5 100644 --- a/src/translations/enGB.ts +++ b/src/translations/enGB.ts @@ -11,5 +11,10 @@ const enGB: TranslationsType = { mustBeLowerThan: 'Must be earlier then', mustBeBetween: 'Must be between', dateIsDisabled: 'Day is not allowed', + previous: 'Previous', + next: 'Next', + typeInDate: 'Type in date', + pickDateFromCalendar: 'Pick date from calendar', + close: 'Close', } export default enGB diff --git a/src/translations/utils.ts b/src/translations/utils.ts index 2dc7b5d1..f4eaacdf 100644 --- a/src/translations/utils.ts +++ b/src/translations/utils.ts @@ -8,6 +8,11 @@ export type TranslationsType = { mustBeLowerThan: string mustBeBetween: string dateIsDisabled: string + previous: string + next: string + typeInDate: string + pickDateFromCalendar: string + close: string } let translationsPerLocale: Record = {}