Skip to content

fix(web): make composer suggestions usable with screen readers - #10154

Open
akj wants to merge 2 commits into
pingdotgg:mainfrom
akj:fix/composer-screen-reader-suggestions
Open

fix(web): make composer suggestions usable with screen readers#10154
akj wants to merge 2 commits into
pingdotgg:mainfrom
akj:fix/composer-screen-reader-suggestions

Conversation

@akj

@akj akj commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

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

  • 26 focused tests passed; scoped web typechecking, targeted lint, formatting, and diff checks passed.
  • Isolated Chrome checks covered command/skill/file suggestions, arrows, Enter/Tab/mouse selection, Escape, empty-result recovery, multiline editing, prompt history, and thread switching.
  • Andrew tested with NVDA in Chrome on Windows and confirmed suggestion names/descriptions and the skill-chip announcement.
  • Desktop shares the web composer; a packaged desktop build and the separate native mobile composer were not runtime-tested. Simultaneously mounted composers were not runtime-tested.

UI Changes

Visual styling is unchanged. Matching crops show the original composer at 761d4ba and this PR at 5ddfc53.

Before After
Original slash-command suggestions Accessible slash-command suggestions with the same visual layout

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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Implemented with GPT-6 in the Codex harness, with manual NVDA validation by Andrew.

Note

Announce composer suggestions and skill chips to screen readers

  • Skill chips in ComposerPromptEditor now expose an image role with an accessible label derived from the skill name; the decorative icon stays hidden from assistive tech.
  • ComposerCommandMenu renders a labeled ARIA listbox with stable option IDs and aria-selected on the active item; ChatComposer wires the list and active-option identifiers to the editor via aria-activedescendant and related attributes.
  • Pressing Escape while the suggestion menu is open closes it and suppresses reopening for the unchanged prompt snapshot; changing the prompt or cursor clears the dismissal state and resumes trigger detection.
  • A status region announces loading and empty suggestion states; draft or thread reset clears dismissal and highlight state.
  • Risk: ComposerCommandMenu now requires a listId prop — 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.

@cursor

cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot 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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 5ddfc53

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.

@akj akj changed the title fix(web): announce composer suggestions and skill chips to screen readers fix(web): make composer suggestions usable with screen readers Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Screen reader users cannot select composer suggestions

1 participant