(null);
@@ -275,7 +286,6 @@ const DateRangePicker = React.forwardRef(
invalid={invalid}
warning={warning}
ariaLabelledby={joinStrings(ariaLabelledby, triggerContentId)}
- ariaLabel={i18nStrings?.ariaLabel}
ariaDescribedby={ariaDescribedby}
className={clsx(testutilStyles.label, styles.label, {
[styles['label-enabled']]: !readOnly && !disabled,
@@ -354,6 +364,9 @@ const DateRangePicker = React.forwardRef(
}
/>
+
+ {ariaLabel || i18nStrings?.ariaLabel}
+
);
}
diff --git a/src/date-range-picker/interfaces.ts b/src/date-range-picker/interfaces.ts
index c9fc7334a1..3f3a505cf5 100644
--- a/src/date-range-picker/interfaces.ts
+++ b/src/date-range-picker/interfaces.ts
@@ -208,6 +208,11 @@ export interface DateRangePickerProps
* Defaults to `false`.
*/
hideTimeOffset?: boolean;
+
+ /**
+ * Adds `aria-label` to the trigger and dropdown.
+ */
+ ariaLabel?: string;
}
export namespace DateRangePickerProps {
@@ -310,16 +315,19 @@ export namespace DateRangePickerProps {
export interface I18nStrings {
/**
* Adds `aria-label` to the trigger and dropdown.
+ * @deprecated Use `ariaLabel` on the component instead.
*/
ariaLabel?: string;
/**
* Adds `aria-labelledby` to the trigger and dropdown.
+ * @deprecated Use `ariaLabelledby` on the component instead.
*/
ariaLabelledby?: string;
/**
* Adds `aria-describedby` to the trigger and dropdown.
+ * @deprecated Use `ariaDescribedby` on the component instead.
*/
ariaDescribedby?: string;
diff --git a/src/internal/components/button-trigger/index.tsx b/src/internal/components/button-trigger/index.tsx
index 9d89d871a8..92ed21a2ed 100644
--- a/src/internal/components/button-trigger/index.tsx
+++ b/src/internal/components/button-trigger/index.tsx
@@ -28,7 +28,6 @@ export interface ButtonTriggerProps extends BaseComponentProps {
inlineTokens?: boolean;
ariaHasPopup?: 'true' | 'listbox' | 'dialog';
ariaControls?: string;
- ariaLabel?: string;
ariaLabelledby?: string;
ariaDescribedby?: string;
onKeyDown?: CancelableEventHandler;
@@ -53,7 +52,6 @@ const ButtonTrigger = (
inlineTokens,
inFilteringToken,
ariaHasPopup,
- ariaLabel,
ariaLabelledby,
ariaDescribedby,
ariaControls,
@@ -90,7 +88,6 @@ const ButtonTrigger = (
),
disabled: disabled,
'aria-expanded': pressed,
- 'aria-label': ariaLabel,
'aria-labelledby': ariaLabelledby,
'aria-describedby': ariaDescribedby,
'aria-haspopup': ariaHasPopup ?? 'listbox',