fix(web): make composer suggestions usable with screen readers - #10154
Open
akj wants to merge 2 commits into
Open
fix(web): make composer suggestions usable with screen readers#10154akj wants to merge 2 commits into
akj wants to merge 2 commits into
Conversation
Contributor
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused accessibility correction to the existing web composer, adding screen-reader labels, live status announcements, keyboard dismissal, and stable suggestion selection semantics. The changes are isolated to the composer UI and accompanying tests, with no product-default, schema, deployment, or sensitive-data impact. You can add or adjust custom eligibility rules. Learn more. |
2 tasks
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.
What Changed
Screen reader users can now identify and select skills, files, and slash commands from the composer suggestion menus. The highlighted name and description are exposed while focus stays in the multiline editor. Inserted skill chips have a spoken name when navigating the prompt.
The editor references the existing list and highlight state, with composer-scoped IDs and concise loading/empty feedback. Escape dismisses suggestions without reopening them for the unchanged caret and text.
Closes #10153.
Why
The suggestion pickers were unusable with a screen reader: users could not identify and choose the intended result, despite the existing keyboard highlight and selection handlers. The separate Lexical editor lacked an accessible connection to the list and active option. The skill-chip naming gap was found during NVDA testing of that fix. This preserves the visual UI and uses the existing selection state.
Validation
UI Changes
Visual styling is unchanged. Matching crops show the original composer at 761d4ba and this PR at 5ddfc53.
Silent keyboard demo, assembled from captured interaction steps with key captions: command navigation, Escape dismissal, skill filtering and insertion, and moving across a skill chip. This shows browser behavior; NVDA speech was validated separately by Andrew.
keyboard-demo.mp4
Checklist
Implemented with GPT-6 in the Codex harness, with manual NVDA validation by Andrew.
Note
Announce composer suggestions and skill chips to screen readers
ComposerPromptEditornow expose an image role with an accessible label derived from the skill name; the decorative icon stays hidden from assistive tech.ComposerCommandMenurenders a labeled ARIA listbox with stable option IDs andaria-selectedon the active item;ChatComposerwires the list and active-option identifiers to the editor viaaria-activedescendantand related attributes.ComposerCommandMenunow requires alistIdprop — any existing caller that does not supply it will fail at render. The three in-tree tests in ComposerCommandMenu.test.tsx are updated.Macroscope summarized 5ddfc53.