-
Notifications
You must be signed in to change notification settings - Fork 167
[terra-form-select] Option group headings not read on desktop screen readers #2663
Comments
This is an interesting problem to solve because when scrolling through the list of options we only update the aria-live region (the contents of which is what screen readers use to determine what to announce) based on the active option (the blue highlighted value). I'm not sure if this was previously working or what prior art does. Based on the answer to that would drive how we should go about announcing the option group labels... I imagine it would be similar to how the screen reader says "list start" at the beginning of a list, only it would say "option group name, first option name", for example. |
Looks like native select allows us to use keyboard navigation to hover over Problem is, when voiceover is off, native select does not allow you to keyboard navigate to the We don't have a way to determine whether AT is currently being used (or not) and since we have rolled our own custom select component implementation (which doesn't delegate to the native So, it seems like we would need to allow for keyboard navigation on all menu items, inclusive of code: <label for="dino-select">Choose a dinosaur:</label>
<select id="dino-select">
<optgroup label="Theropods">
<option>Tyrannosaurus</option>
<option>Velociraptor</option>
<option>Deinonychus</option>
</optgroup>
<optgroup label="Sauropods">
<option>Diplodocus</option>
<option>Saltasaurus</option>
<option>Apatosaurus</option>
</optgroup>
</select> |
@dev-cprice With a bit of investigation I noticed that we need to make some major changes to have keyboard navigation applicable to @neilpfeiffer From UX perspective should the user be allowed to navigate |
@dev-cprice , @lokesh-0813, can we implement something like for the screen reader set the aria-label text such as concatenating the optgroup name and the option selected. so that user could come to know under which group the option is selected ? |
@lokesh-0813 to answer your question whether or not sighted keyboard-only users would expect to navigate to an OptGroup, the answer is no. Ideally, the keyboard-only user would not navigate to the OptGroup. However, if that is our only option to ensure desktop screen reader users have the OptGroups announced, it is a fairly minor compromise. That is with the caveat that the keyboard-only users would not be able to select the OptGroup. |
@lokesh-0813 @ShettyAkarsh let's go with the option to highlight (but not select) the option group as @scottwilmarth suggested. |
Removing the UX block because it looks like it was accidentally added back in after @ryanthemanuel removed it. |
@ryanthemanuel @scottwilmarth I enabled keyboard navigation for the We need new styles to differentiate optGroups from options when consumers navigate via keyboard to avoid confusion. The Screenreader picks up optGroups and announces the content after enabling keyboard navigation. CC: @neilpfeiffer |
@neilpfeiffer and I were discussing, and we think the EDIT Based on some quick research, since our Reference |
@jeremyfuksa Above phenomenon happens because of this. We have a From what I notice we could try two approaches(without enabling keyboard access to Let me know your thoughts. |
Let me continue to research this and I'll get back to you soon. |
In option 1, are you saying that a keyboard user would hear something like the following in my hypothetical optgroup? e.g. "Group Droids, R2D2. Group Droids, C3PO. (navigates to next group) Jedi, Luke Skywalker." |
@jeremyfuksa Yes, exactly. I think we could do either way(announcing the groups at the end like "R2D2, Group Droids etc) |
OK. That sounds good. Let's give that a shot. |
Bug Report
Description
The option group headings in the form select examples aren't read by VoiceOver or JAWS. Works fine on mobile though.
Steps to Reproduce
Additional Context / Screenshots
VoiceOver on iOS reads this text correctly.
Expected Behavior
Screen readers should read the option group heading text.
The text was updated successfully, but these errors were encountered: