Skip to content

fix(web): per-trigger suggestion labels and font-preview ARIA gating - #1

Merged
akj merged 2 commits into
akj:fix/composer-screen-reader-suggestionsfrom
Leos-Khai:fix/composer-sr-trigger-labels
Sep 18, 2026
Merged

akj merged 2 commits into
akj:fix/composer-screen-reader-suggestionsfrom
Leos-Khai:fix/composer-sr-trigger-labels

Conversation

@Leos-Khai

Copy link
Copy Markdown

Carries the two pieces from pingdotgg#11666 you called out into pingdotgg#10154, so the composer accessibility work lands in one place. Two commits, take or drop either independently.

Per-trigger listbox labels. Composer suggestions becomes Files and folders / Commands / Skills / Pull requests, so the list says what it holds before the first row is read.

Suggestion ARIA stays off editors without menus. ComposerPromptEditor is also the Settings font preview, which has no trigger menus. With ariaLabel="Message", ariaAutoComplete="list" and aria-haspopup="listbox" hardcoded, that preview announced as a chat field with autocomplete. The chat composer now opts in by passing ariaLabel and always passing suggestionListId (capability); activeSuggestionId stays gated on list visibility and drives aria-activedescendant and aria-controls. The font preview passes neither and reads as a plain multiline field. aria-multiline stays static since it is true of both.

One thing I left alone but want to flag: encodeURIComponent in composerSuggestionOptionId throws URIError on a lone surrogate, which NTFS permits in file names. pingdotgg#11666 used a fixed-width %XXXX escape of [\s%] instead. Rare enough that I did not want to widen this PR; happy to add it if you want it.

Verified: tsc --noEmit clean for apps/web, targeted lint shows only the pre-existing set-state-in-effect warnings in ChatComposer.tsx, and ComposerCommandMenu.test.tsx + composerMenuHighlight.test.ts pass (8 tests).

🤖 Generated with Claude Code

Leos-Khai and others added 2 commits September 15, 2026 07:03
A single "Composer suggestions" name tells a screen reader user that a list
opened but not which one. Naming it by trigger ("Files and folders",
"Commands", "Skills", "Pull requests") says what the options are before
any row is read.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ComposerPromptEditor is also the Settings font preview, which has no
trigger menus. Hardcoding the "Message" label, aria-autocomplete and
aria-haspopup on the editor made that preview announce as a chat field
with autocomplete. The chat composer now opts in by passing the label and
its listbox id; the font preview passes neither and reads as a plain
multiline field.

aria-controls follows the active option rather than list visibility, which
is the same moment in practice but keeps the reference from ever pointing
at a listbox with no highlighted row.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M labels Sep 14, 2026
@akj
akj merged commit 2c5b68b into akj:fix/composer-screen-reader-suggestions Sep 18, 2026
6 checks passed
@Leos-Khai
Leos-Khai deleted the fix/composer-sr-trigger-labels branch September 23, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 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.

2 participants