Repository navigation
fix: prevent message actions from repeating bot responses - #5865
Open
ahonamatata wants to merge 2 commits into
Open
ahonamatata wants to merge 2 commits into
ahonamatata wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 068c5ef2-5e03-4d29-8666-f2b34b1bcc92
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 068c5ef2-5e03-4d29-8666-f2b34b1bcc92
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused production change is supported by accessibility-tree regression coverage and reported manual Narrator validation.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes #5849 by removing the redundant accessible-name relationship that caused screen readers to repeat bot responses when focusing message actions.
Changes:
- Removes obsolete ARIA label and generated ID wiring.
- Adds Chrome accessibility-tree regression coverage.
- Extends the test harness to return DevTools command results.
| File | Description |
|---|---|
CHANGELOG.md |
Records the accessibility fix. |
__tests__/html2/accessibility/messageActions.html |
Tests action names and surrounding accessibility semantics. |
packages/component/src/Activity/StackedLayout.tsx |
Removes generated ARIA ID wiring. |
packages/component/src/Activity/StackedLayoutRoot.tsx |
Removes the problematic aria-labelledby. |
packages/test/harness/src/browser/proxies/host.js |
Exposes the new DevTools RPC. |
packages/test/harness/src/host/common/host/index.js |
Registers the RPC implementation. |
packages/test/harness/src/host/common/host/sendAndGetDevToolsCommand.js |
Returns result-bearing DevTools responses. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Changelog Entry
Description
Windows Narrator repeats an entire bot response when keyboard focus first enters native message actions such as Copy, Like, or Dislike. The controls already expose concise accessible names, so adding another button label does not break the relationship that causes the repeated response.
Latest-main source still labeled the role-less outer stacked-layout container with the inner message row. The label target contains the greeting, full response, and action toolbar. A live accessibility-tree reproduction using published
botframework-webchat@4.19.1, which contains the same relationship, showed that the actions had concise names while an ancestor accessible name contained the full response. This explains why the Agent Builder article-level workaround does not resolve the nested Web Chat context announced when focus enters an action.This change removes the redundant accessible-name relationship from the outer layout and removes its now-unused generated ID. The inner message group and transcript article continue to expose message context and navigation semantics.
Reproduction:
AllowCopy,LikeAction, andDislikeAction.feedbackActionsPlacementtoactivity-actions.Manual Edge plus Narrator validation passed for the #5849 first-focus announcement: keyboard-driven focus on Copy announced only “Copy, button,” and arrow navigation announced Like and Dislike without repeating the response. A separate transcript activation regression remains: activating the blue-outlined transcript activity reports “Item has no primary action” instead of moving focus into the message actions.
Design
The fix breaks the proven causal relationship instead of changing button labels, moving the toolbar, or modifying the activity article. It does not change localization, DOM order, keyboard order, or focus order. The message row remains
role="group"witharia-roledescription="message", and transcript navigation remains represented by itsarticleactive descendant.StackedLayoutRoothas two callers. The part-grouping caller never supplied the removed label prop, and the message-layout caller was its only user. The generated message-row ID had no remaining caller after removing the outer relationship.Specific Changes
aria-labelledbyfrom the role-less stacked-layout container.CHANGELOG.md.Validation:
npm clean-install --userconfig .npmrc.npm run build-browseron Windows.npm run buildfor the PR commit in an isolated Linux container. The archive's CRLF shell scripts were normalized only inside the disposable validation volume.npm test -- --testPathPattern "__tests__/html2/accessibility/messageActions\.html$"in the documented Selenium Grid through the Linux validation container: 1 suite and 1 test passed..\node_modules\.bin\eslint.cmd --report-unused-disable-directives --max-warnings 0 packages\component\src packages\test\harness\src.npm run precommit:typecheck --workspace ./packages/component.npm exec prettier -- --checkfor every changed component, HTML test, and harness file.git diff --check.botframework-webchat@4.19.1, not the PR build: action names wereCopy,Like, andDislike; the response-bearing ancestor name existed before removing the outer relationship and disappeared afterward; the message group and transcript article remained.BotFramework-WebChat\.worktrees; the same focused test passed through the Linux Selenium Grid route.BasicTranscript,ActivityRow, orFocusTrap.action_requiredwith zero jobs until a maintainer authorizes the workflow.CHANGELOG.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed