(
selectedDays || new Date(),
@@ -226,6 +232,9 @@ export const DatePicker = ({
onMouseDown={pickerMouseDown}
onKeyUp={handleKeyUp}
onKeyDown={handleOnKeyDown}
+ role="region"
+ aria-label={datePickerAriaLabel}
+ aria-labelledby={datePickerAriaLabelledBy}
>
void;
/** Date format string to be applied to the date inputs */
dateFormatOverride?: string;
+ /** Prop to specify the aria-label attribute of the date picker */
+ datePickerAriaLabel?: string;
+ /** Prop to specify the aria-labelledby attribute of the date picker */
+ datePickerAriaLabelledBy?: string;
}
export const DateInput = React.forwardRef(
@@ -137,6 +141,8 @@ export const DateInput = React.forwardRef(
inputName,
onPickerClose,
onPickerOpen,
+ datePickerAriaLabel,
+ datePickerAriaLabelledBy,
...rest
}: DateInputProps,
ref,
@@ -541,6 +547,8 @@ export const DateInput = React.forwardRef(
setOpen={setOpen}
pickerTabGuardId={pickerTabGuardId.current}
onPickerClose={onPickerClose}
+ ariaLabel={datePickerAriaLabel}
+ ariaLabelledBy={datePickerAriaLabelledBy}
/>
);