Skip to content

Add unique accessible names to chat controls - #377

Merged
jdneo merged 1 commit into
mainfrom
accessibility/chat-control-names
Jul 30, 2026
Merged

Add unique accessible names to chat controls#377
jdneo merged 1 commit into
mainfrom
accessibility/chat-control-names

Conversation

@jdneo

@jdneo jdneo commented Jul 29, 2026

Copy link
Copy Markdown
Member

Name focusable chat controls and number sibling message fragments so Windows UI Automation can distinguish them.

fix https://github.com/microsoft/GitHub-Copilot-for-Eclipse/issues/78

with this change, the accessibility check becomes:
image

Those remaining warnings are the eclipse platform related issues, out of our control.

Name focusable chat controls and number sibling message fragments so Windows UI Automation can distinguish them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 29, 2026 07:26

Copilot AI 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.

Pull request overview

This PR improves accessibility of the chat UI by assigning explicit accessible names to focusable controls and ensuring repeated message fragments within a turn get unique (ordinal) accessible names, addressing issue #78 and improving Windows UI Automation distinguishability.

Changes:

  • Added new i18n keys for accessibility names in both the main UI bundle and the chat bundle.
  • Applied accessibility names to key chat controls (turn message StyledTexts, warning text, agent status, code blocks, and action buttons).
  • Introduced per-turn ordinal naming for multiple text fragments and added unit tests to verify uniqueness.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/messages.properties Adds accessibility-name strings for ActionBar tools and turn/warn message fragments.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/Messages.java Exposes new i18n accessibility-name fields for the main UI message bundle.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/WarnWidget.java Assigns an accessible name to the warning message StyledText.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/UserTurnWidget.java Applies ordinal accessible names to user message text blocks.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/CopilotTurnWidget.java Applies ordinal accessible names to Copilot message text blocks.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidget.java Adds textBlockIndex and helper to generate unique accessible names per text block.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/SubagentTurnWidget.java Applies ordinal accessible names to subagent message text blocks.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ThinkingSection.java Adds accessible names for thinking heading/details text controls.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/SourceViewerComposite.java Adds accessible names for code blocks and copy/insert buttons (via updated helper signature).
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/AgentStatusLabel.java Adds an accessible name for the tool status StyledText.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/AgentMessageWidget.java Adds accessible names for coding agent title/description controls.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ActionBar.java Adds accessible names for send-to-job and tool configuration buttons.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/messages.properties Adds chat-bundle accessibility-name strings (agent widgets, subagent, code block/buttons, thinking).
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/Messages.java Exposes new chat-bundle accessibility-name fields.
com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidgetTestSupport.java Introduces shared SWT + service mocking fixture for turn widget tests.
com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidgetPartialRenderTest.java Refactors to reuse the shared test fixture.
com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidgetAccessibilityTest.java Adds a test asserting unique accessible names for multiple text blocks in one turn.
.github/copilot-instructions.md Documents the new accessibility naming convention for focusable sibling controls.
Comments suppressed due to low confidence (1)

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/AgentMessageWidget.java:94

  • params.getDescription().substring(0, 100) will throw StringIndexOutOfBoundsException when the description is shorter than 100 characters. This can crash rendering for short agent descriptions; truncate conditionally instead.
          Messages.agentMessageWidget_messageAccessibilityName);

      String reducedDescription = StringUtils.isBlank(params.getDescription()) ? ""
          : params.getDescription().substring(0, 100) + "...";
      descLabel.setMarkup(reducedDescription);

@jdneo
jdneo merged commit 721c910 into main Jul 30, 2026
5 checks passed
@jdneo
jdneo deleted the accessibility/chat-control-names branch July 30, 2026 02:57
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.

4 participants