diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index ec3e5bed66d2..66fd4f99be9a 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -2692,9 +2692,10 @@ Map { "type": "default", }, "propTypes": Object { - "ariaLabel": Object { + "aria-label": Object { "type": "string", }, + "ariaLabel": [Function], "className": Object { "type": "string", }, diff --git a/packages/react/src/components/Dropdown/Dropdown.tsx b/packages/react/src/components/Dropdown/Dropdown.tsx index 4fd374615493..4edf6138d627 100644 --- a/packages/react/src/components/Dropdown/Dropdown.tsx +++ b/packages/react/src/components/Dropdown/Dropdown.tsx @@ -61,8 +61,15 @@ export interface OnChangeData { export interface DropdownProps extends Omit, ExcludedAttributes> { /** + * Specify a label to be read by screen readers on the container node * 'aria-label' of the ListBox component. */ + ['aria-label']?: string; + + /** + * @deprecated please use `aria-label` instead. + * Specify a label to be read by screen readers on the container note. + */ ariaLabel?: string; /** @@ -206,7 +213,8 @@ const Dropdown = React.forwardRef( direction, items, label, - ariaLabel, + ['aria-label']: ariaLabel, + ariaLabel: deprecatedAriaLabel, itemToString = defaultItemToString, itemToElement, renderSelectedItem, @@ -358,7 +366,7 @@ const Dropdown = React.forwardRef(