You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Toggle Group component incorrectly uses attribute role="group" for grouping the item elements, which have attribute role="radio". ARIA spec states that radio buttons should be grouped within an element with role="radiogroup" attribute.
Current Behavior
<ToggleGroup.Root type="single"> exposes a role "group".
VoiceOver on Mac reads the Root element as "group". VoiceOver doesn't read any positions or total amount of items at the Item elements.
Expected behavior
<ToggleGroup.Root type="single"> exposes a role "radiogroup".
VoiceOver on Mac provides additional information for the user: Root reads out as "radio group" and Item elements have positions and total amount of radio buttons read out, for example "1 of 2" for the first first button when there are two items in total.
Bug report
Toggle Group component incorrectly uses attribute
role="group"
for grouping the item elements, which have attributerole="radio"
. ARIA spec states that radio buttons should be grouped within an element withrole="radiogroup"
attribute.Current Behavior
<ToggleGroup.Root type="single">
exposes a role"group"
.VoiceOver on Mac reads the Root element as "group". VoiceOver doesn't read any positions or total amount of items at the Item elements.
Expected behavior
<ToggleGroup.Root type="single">
exposes a role"radiogroup"
.VoiceOver on Mac provides additional information for the user: Root reads out as "radio group" and Item elements have positions and total amount of radio buttons read out, for example "1 of 2" for the first first button when there are two items in total.
Reproducible example
CodeSandbox
Suggested solution
Change the role attribute value of the
ToggleGroup.Root
to"radiogroup"
when theToggleGroup.Item
has a role"radio"
.Additional context
radio
role: "Authors SHOULD ensure that elements with role radio are explicitly grouped in order to indicate which ones affect the same value. This is achieved by enclosing the radio elements in an element with role radiogroup."Your environment
The text was updated successfully, but these errors were encountered: