Add unique accessible names to chat controls - #377
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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 throwStringIndexOutOfBoundsExceptionwhen 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);
duzitong
approved these changes
Jul 30, 2026
ethanyhou
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:

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