fix(a11y): add ARIA combobox pattern to command palette and quick open#21
Open
Alexi5000 wants to merge 1 commit into
Open
fix(a11y): add ARIA combobox pattern to command palette and quick open#21Alexi5000 wants to merge 1 commit into
Alexi5000 wants to merge 1 commit into
Conversation
Both picker overlays lacked ARIA attributes, making them invisible to screen readers. This adds: - role=dialog + aria-modal + aria-label on the overlay container - aria-autocomplete=list + aria-controls on the search input - aria-activedescendant pointing to the currently highlighted item - role=listbox on the results container - role=option + aria-selected on each result item No visual or behavioral changes — purely assistive technology support.
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.
Summary
Adds WAI-ARIA combobox/dialog pattern to the Command Palette and Quick Open overlays for screen reader accessibility.
Problem
Both
command-palette.tsxandquick-open.tsximplement keyboard-navigable picker UIs (Up/Down/Enter/Esc) with zero ARIA attributes. Screen readers cannot identify these as dialogs, cannot associate the search input with results, and cannot announce the currently selected item.Changes
role="dialog",aria-modal="true",aria-label="Command palette"aria-label,aria-autocomplete="list",aria-controls,aria-activedescendantid,role="listbox",aria-labelid,role="option",aria-selectedrole="dialog",aria-modal="true",aria-label="Go to file"aria-label,aria-autocomplete="list",aria-controls,aria-activedescendantid,role="listbox",aria-labelid,role="option",aria-selectedNo visual or behavioral changes. Purely assistive technology support following WAI-ARIA Authoring Practices for combobox with listbox.
Test Plan
pnpm checkpasses (no type errors)