From d693c2981fe4a96568f4a0436073908c5afd511d Mon Sep 17 00:00:00 2001 From: Ty Littlefield Date: Wed, 21 Jan 2026 10:24:12 -0700 Subject: [PATCH] Add group role and aria-labeledby attribute to groups. --- packages/react-select/src/components/Group.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/react-select/src/components/Group.tsx b/packages/react-select/src/components/Group.tsx index aa8e67b556..59bd28c95c 100644 --- a/packages/react-select/src/components/Group.tsx +++ b/packages/react-select/src/components/Group.tsx @@ -77,9 +77,15 @@ const Group = < theme, selectProps, } = props; + + const headingId = + headingProps?.id || + `${selectProps?.instanceId || "rs"}-group-${String(label).replace(/\s+/g, "-").toLowerCase()}`; + return ( -
- +