From 6f5f4eb9312cdab19582a7fca4a65bca497e795d Mon Sep 17 00:00:00 2001 From: James Fenn Date: Sun, 1 Oct 2023 21:29:35 -0400 Subject: [PATCH] fix #741 - remove any useId-based props inside select popover/portal --- src/components/select/select.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/select/select.tsx b/src/components/select/select.tsx index de9271e5..5a38ec37 100644 --- a/src/components/select/select.tsx +++ b/src/components/select/select.tsx @@ -135,6 +135,11 @@ function ListBox(props: ListBoxProps) { const { listBoxRef = ref, state } = props; const { listBoxProps } = useListBox(props, state, listBoxRef); + // As this is inside a portal (within ), nothing from Preact's useId can be trusted + // ...but nothing should be using these IDs anyway. + listBoxProps["id"] = undefined; + listBoxProps["aria-labelledby"] = undefined; + return (