diff --git a/packages/@headlessui-react/CHANGELOG.md b/packages/@headlessui-react/CHANGELOG.md index 521b008..a349a2c 100644 --- a/packages/@headlessui-react/CHANGELOG.md +++ b/packages/@headlessui-react/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow changes to the `className` prop when the `` component is currently not transitioning ([#2722](https://github.com/tailwindlabs/headlessui/pull/2722)) - Export (internal-only) component interfaces for TypeScript compiler ([#2313](https://github.com/tailwindlabs/headlessui/pull/2313)) - Fix infinite render-loop for `` and `` when `as={Fragment}` ([#2760](https://github.com/tailwindlabs/headlessui/pull/2760)) +- Fix VoiceOver bug for `Listbox` component in Chrome ([#2824](https://github.com/tailwindlabs/headlessui/pull/2824)) ### Added diff --git a/packages/@headlessui-react/src/components/listbox/listbox.test.tsx b/packages/@headlessui-react/src/components/listbox/listbox.test.tsx index 737445a..e2e3568 100644 --- a/packages/@headlessui-react/src/components/listbox/listbox.test.tsx +++ b/packages/@headlessui-react/src/components/listbox/listbox.test.tsx @@ -8,7 +8,6 @@ import { assertListboxButtonLinkedWithListbox, assertListboxButtonLinkedWithListboxLabel, assertListboxLabel, - assertListboxLabelLinkedWithListbox, assertListboxOption, assertNoActiveListboxOption, assertNoSelectedListboxOption, @@ -515,7 +514,6 @@ describe('Rendering', () => { textContent: JSON.stringify({ open: true, disabled: false }), }) assertListbox({ state: ListboxState.Visible }) - assertListboxLabelLinkedWithListbox() assertListboxButtonLinkedWithListboxLabel() }) ) diff --git a/packages/@headlessui-react/src/components/listbox/listbox.tsx b/packages/@headlessui-react/src/components/listbox/listbox.tsx index 9c3eedf..154883f 100644 --- a/packages/@headlessui-react/src/components/listbox/listbox.tsx +++ b/packages/@headlessui-react/src/components/listbox/listbox.tsx @@ -857,11 +857,7 @@ function OptionsFn( } }) - let labelledby = useComputed( - () => data.labelRef.current?.id ?? data.buttonRef.current?.id, - [data.labelRef.current, data.buttonRef.current] - ) - + let labelledby = useComputed(() => data.buttonRef.current?.id, [data.buttonRef.current]) let slot = useMemo( () => ({ open: data.listboxState === ListboxStates.Open }), [data] diff --git a/packages/@headlessui-vue/CHANGELOG.md b/packages/@headlessui-vue/CHANGELOG.md index 2e0de2c..60be506 100644 --- a/packages/@headlessui-vue/CHANGELOG.md +++ b/packages/@headlessui-vue/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow `