Skip to content

Commit

Permalink
[@mantine/core] Combobox: Fix incorrect aria-controls attribute bei…
Browse files Browse the repository at this point in the history
…ng set on the target element when the dropdown is closed (#7114)
  • Loading branch information
Samy0412 authored Nov 16, 2024
1 parent f575415 commit b5e9be1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function useComboboxTargetProps({
'aria-haspopup': 'listbox',
'aria-expanded':
(withExpandedAttribute && !!(ctx.store.listId && ctx.store.dropdownOpened)) || undefined,
'aria-controls': ctx.store.listId,
'aria-controls': ctx.store.dropdownOpened ? ctx.store.listId : undefined,
'aria-activedescendant': ctx.store.dropdownOpened
? selectedOptionId || undefined
: undefined,
Expand Down

0 comments on commit b5e9be1

Please sign in to comment.