ROU-12938: Fix keyboard navigation and screen reader support for group headers - #483
Open
os-davidlourenco wants to merge 5 commits into
Open
ROU-12938: Fix keyboard navigation and screen reader support for group headers#483os-davidlourenco wants to merge 5 commits into
os-davidlourenco wants to merge 5 commits into
Conversation
joselrio
approved these changes
Jul 31, 2026
joselrio
left a comment
Contributor
There was a problem hiding this comment.
LGTM, if I had to raise something I. would say we could also allow to use space to select an option. However this is more like a new improvement and not related with the work suggested here.
Contributor
There was a problem hiding this comment.
Pull request overview
Improves accessibility and keyboard interaction for option-group headers in VirtualSelect when multi-select group toggling is enabled, bringing group headers into the same roving-focus and activation model as options.
Changes:
- Adds an
aria-labelfor selectable group headers to make the group-level toggle discoverable to screen readers. - Centralizes “skip” logic for navigation so selectable group headers can participate in arrow-key focus while non-selectable headers remain skipped.
- Enables Enter activation on focused selectable group headers by routing to existing
onGroupTitleClicklogic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+363
to
366
| } else if (this.multiple) { | ||
| const groupLabel = this.secureText(Utils.getString(d.label)); | ||
| ariaLabel = `aria-label="${groupLabel}, ${this.secureText(this.selectAllText)}"`; | ||
| } |
Comment on lines
3054
to
+3056
| selectFocusedOption() { | ||
| this.selectOption(this.$dropboxContainer.querySelector('.vscomp-option.focused')); | ||
| const $focusedEle = this.$dropboxContainer.querySelector('.vscomp-option.focused'); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Internal
What is the current behavior?
When
multiple: trueand option groups are enabled, group headers (.group-titlerows) can be clicked to select or deselect all options in that group. However, those headers are excluded from keyboard navigation: arrow-key focus skips them, rovingtabindexnever lands on them, and Enter does not activate them when focused. They are also not clearly exposed to assistive technologies — selectable group headers do not get a descriptivearia-label, so screen reader users cannot discover or understand the group-level toggle the way pointer users can.What is the new behavior?
Selectable group headers (multi-select with group checkboxes enabled) are now part of the same roving-focus flow as regular options. Arrow keys can move focus onto and off group titles, focused group titles receive
tabindex="0", and Enter toggles selection for the whole group via the existingonGroupTitleClicklogic. Selectable group headers also expose anaria-labelthat includes the group name and the select-all action text (e.g."Option group 1, Select All"), so they are announced as interactive controls. Non-selectable group headers (single-select, or whendisableOptionGroupCheckboxis set) continue to be skipped during navigation.aria-labelfor selectable group headersDoes this introduce a breaking change?
Other information
This is an accessibility fix only. Pointer behavior for group headers is unchanged. No new configuration options were added — selectable group headers reuse the existing
selectAllTextvalue in theiraria-label.