Skip to content

Fix accessibility label for Copilot model picker dropdown #251138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 10, 2025

The Copilot model picker dropdown in inline chat (Ctrl+I) was not providing adequate accessibility labels for screen reader users. Previously, the dropdown only announced "Pick Model - {model_name}" which didn't clearly communicate the purpose of the control.

Changes Made

  1. Updated tooltip text: Changed from "Pick Model" to "Select Language Model" to provide clearer context
  2. Enhanced aria-label: Added custom setAriaLabelAttributes method that provides a descriptive label: "Select language model, currently {model_name}"

Before vs After

Before: Screen readers announced "Pick Model - GPT-4"
After: Screen readers announce "Select language model, currently GPT-4"

Technical Details

  • Overrides setAriaLabelAttributes in ModelPickerActionItem class
  • Uses VS Code's localize() function for internationalization support
  • Maintains all existing functionality while improving accessibility
  • Automatically updates when the model selection changes

The fix ensures compliance with WCAG 4.1.2 (Name, Role, Value) by providing clear, descriptive labels that help screen reader users understand both the control's purpose and current state.

Fixes #250598.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] There is no Visual label provided to menu submenu Copilot Models dropdown: A11y_ Visual Studio Code Client_ Copilot Inline Chat_Use inline chat in the editor and ensure all elements are accessible _Name Role Value. Fix accessibility label for Copilot model picker dropdown Jun 10, 2025
@Copilot Copilot AI requested a review from meganrogge June 10, 2025 20:24
Copilot finished work on behalf of meganrogge June 10, 2025 20:24
@meganrogge meganrogge closed this Jun 10, 2025
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

Error loading sessions

Retrying...

Successfully merging this pull request may close these issues.

There is no Visual label provided to menu submenu Copilot Models dropdown: A11y_ Visual Studio Code Client_ Copilot Inline Chat_Use inline chat in the editor and ensure all elements are accessible _Name Role Value.
2 participants