Skip to content

fix(vscode): make model selection accessible to screen readers - #10688

Merged
marius-kilocode merged 3 commits into
mainfrom
fix-vscode-a11y-model-picker
May 29, 2026
Merged

fix(vscode): make model selection accessible to screen readers#10688
marius-kilocode merged 3 commits into
mainfrom
fix-vscode-a11y-model-picker

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Screen reader users cannot reliably choose models in the VS Code webview because the searchable selector retains focus in an input while moving only a visual option highlight. Model selectors in settings also expose a chosen value without reliably identifying which setting is being changed.

This change makes the shared model selector a labelled searchable combobox/listbox interaction with stable active-option announcements during keyboard navigation. Enter and Escape retain predictable select and dismiss behavior, empty/default states and preview controls are exposed to assistive technology, favorite actions no longer conflict with option semantics, and settings or mode-override selectors identify their specific purpose and description.

@marius-kilocode
marius-kilocode enabled auto-merge May 28, 2026 15:15
@kilo-code-bot

kilo-code-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

All three issues from the CHANGES_REQUESTED review have been addressed in the new commits (fix(vscode): preserve model preview interactions + baseline update):

  1. aria-hidden + focusable content — Resolved. The preview is now wrapped in <Show when={expanded()}>, so ModelPreview is unmounted (not just hidden) when collapsed. No focusable children exist in the hidden preview region.

  2. Single-click preview-before-select in expanded mode — Resolved. The onClick handler in expanded mode now only calls setRow/setPreviewKey (preview), not selectRow. Selection requires either double-click or the explicit Select: <name> button (shown when expanded() && preActive() && !isActive(model)). The test "expanded preview waits for explicit pointer selection" covers this path.

  3. Group separator CSS regression — Resolved. The selector was updated from .model-selector-group-label:not(:first-child) to .model-selector-group:not(:first-child) > .model-selector-group-label, which correctly applies to the new role="group" wrapper structure.

Files Reviewed (11 files)
  • .changeset/clear-model-navigation.md
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/models-accessible-labels-chromium-linux.png
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/shared/model-selector-accessible-chromium-linux.png
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/shared/model-selector-selected-favorite-chromium-linux.png
  • packages/kilo-vscode/tests/model-selector-accessibility.spec.ts
  • packages/kilo-vscode/webview-ui/src/components/settings/ModeEditView.tsx
  • packages/kilo-vscode/webview-ui/src/components/settings/ModelsTab.tsx
  • packages/kilo-vscode/webview-ui/src/components/shared/ModelSelector.tsx — all prior issues resolved
  • packages/kilo-vscode/webview-ui/src/stories/settings.stories.tsx
  • packages/kilo-vscode/webview-ui/src/stories/shared.stories.tsx
  • packages/kilo-vscode/webview-ui/src/styles/model-selector.css

Reviewed by claude-sonnet-4.6 · 828,753 tokens

Review guidance: REVIEW.md from base branch main

@kilo-code-bot kilo-code-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression-focused subagent review: please address these confirmed selector regressions before merge.

  1. packages/kilo-vscode/webview-ui/src/components/shared/ModelSelector.tsx now sets aria-hidden={!expanded()} on the always-mounted preview. ModelPreview contains focusable favorite controls and can include links; when collapsed those controls can still receive keyboard focus while being removed from the accessibility tree. Do not render them while collapsed or make the hidden subtree inert/non-focusable, and add a collapsed-tab-order test.

  2. The same file replaces expanded-mode preview behavior with onClick={() => selectRow(row)} for every model option and removes the explicit select affordance. A pointer user expanding the picker to inspect model details now applies a model and closes on one click instead of previewing before committing. Preserve a preview-before-select path in expanded mode and test it.

  3. The new role=\"group\" wrapper makes every .model-selector-group-label its container's first child, so existing .model-selector-group-label:not(:first-child) separators no longer render. Update the group separator selector/layout to preserve visual grouping.

@marius-kilocode
marius-kilocode force-pushed the fix-vscode-a11y-model-picker branch from a4b6178 to 96d2d3a Compare May 29, 2026 07:32
@marius-kilocode
marius-kilocode dismissed kilo-code-bot[bot]’s stale review May 29, 2026 11:05

Findings were addressed in the follow-up commit and the updated bot review reports no issues found.

@marius-kilocode
marius-kilocode merged commit 9945eb6 into main May 29, 2026
20 checks passed
@marius-kilocode
marius-kilocode deleted the fix-vscode-a11y-model-picker branch May 29, 2026 12:42
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…-picker

fix(vscode): make model selection accessible to screen readers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants