Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed the aria-label assigning to wrapper div of dropdown #17588

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/react/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,10 @@ const Dropdown = React.forwardRef(

// needs to be Capitalized for react to render it correctly
const ItemToElement = itemToElement;
const toggleButtonProps = getToggleButtonProps();
const toggleButtonProps = getToggleButtonProps({
'aria-label': ariaLabel || deprecatedAriaLabel,
});

const helper =
helperText && !isFluid ? (
<div id={helperId} className={helperClasses}>
Expand Down Expand Up @@ -523,7 +526,6 @@ const Dropdown = React.forwardRef(
<ListBox
onFocus={handleFocus}
onBlur={handleFocus}
aria-label={deprecatedAriaLabel || ariaLabel}
size={size}
className={className}
invalid={invalid}
Expand Down
Loading