Skip to content

Add visible focus indicator to MCP elicitation multi-select options#321147

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/a11y-fix-focus-indicator
Draft

Add visible focus indicator to MCP elicitation multi-select options#321147
Copilot wants to merge 2 commits into
mainfrom
copilot/a11y-fix-focus-indicator

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

In the MCP elicitation form (rendered by the chat question carousel), keyboard navigation through multi-select options moved focus with no visible focus indicator, so keyboard users couldn't tell which option was focused (WCAG 2.4.3).

The two selection types manage focus differently:

  • Single-select keeps DOM focus on the list container and uses aria-activedescendant + the .selected class — already visible.
  • Multi-select moves real DOM focus onto each role="option" item via listItems[focusedIndex].focus(). The CSS rule .chat-question-list-item:focus { outline: none } stripped the indicator, leaving focused-but-unchecked items with no visual cue.

Changes

  • chatQuestionCarousel.css: split the combined outline: none rule. The list container still suppresses its outline (relies on aria-activedescendant), while focused list items now render a --vscode-focusBorder outline:
.chat-question-list-item:focus {
	outline: 1px solid var(--vscode-focusBorder);
	outline-offset: -1px;
}

Uses the standard focus-border token (consistent with the freeform textarea styling in the same file), so high-contrast and custom themes are respected. Single-select is unaffected since its items never take direct DOM focus.

Copilot AI requested review from Copilot and removed request for Copilot June 12, 2026 13:42
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot June 12, 2026 13:49
Copilot AI changed the title [WIP] Add visible focus indicator for static option list items Add visible focus indicator to MCP elicitation multi-select options Jun 12, 2026
Copilot AI requested a review from meganrogge June 12, 2026 13:49
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