diff --git a/packages/react-calendar/src/Calendar.tsx b/packages/react-calendar/src/Calendar.tsx index a9aa6745..be53bcd5 100644 --- a/packages/react-calendar/src/Calendar.tsx +++ b/packages/react-calendar/src/Calendar.tsx @@ -63,6 +63,12 @@ export type CalendarProps = { * @example true */ allowPartialRange?: boolean; + /** + * `aria-label` attribute of the calendar container. + * + * @example 'Calendar' + */ + ariaLabel?: string; /** * Type of calendar that should be used. Can be `'gregory`, `'hebrew'`, `'islamic'`, `'iso8601'`. Setting to `"gregory"` or `"hebrew"` will change the first day of the week to Sunday. Setting to `"islamic"` will change the first day of the week to Saturday. Setting to `"islamic"` or `"hebrew"` will make weekends appear on Friday to Saturday. * @@ -328,6 +334,13 @@ export type CalendarProps = { * @example 'range' */ returnValue?: 'start' | 'end' | 'range'; + /** + * The WAI-ARIA role of the calendar. + * + * @default 'dialog' + * @example 'dialog' + */ + role?: React.AriaRole; /** * Whether the user shall select two dates forming a range instead of just one. **Note**: This feature will make react-calendar return array with two dates regardless of returnValue setting. * @@ -602,6 +615,7 @@ const Calendar: React.ForwardRefExoticComponent {renderNavigation()}