Repository navigation
fix: retain copy confirmation for accessibility - #5864
ahonamatata wants to merge 10 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
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
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Fluent theme still overrides the confirmation animation to 500 ms, leaving the reported visual issue unresolved there.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Retains visual and assistive copy confirmation for five seconds.
Changes:
- Adds a persistent atomic status portal with timer cleanup.
- Extends confirmation duration and adds integration coverage.
- Updates the changelog.
| File | Description |
|---|---|
ActivityCopyButton.ts |
Extends legacy animation duration. |
ActivityCopyButton.tsx |
Adds status portal and timeout handling. |
ActivityCopyButton.module.css |
Extends animation and visually hides status. |
CHANGELOG.md |
Records the accessibility fix. |
behavior.html |
Tests status semantics, repetition, and cleanup. |
behavior.hideAndShow.html |
Tests confirmation duration and visibility changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 068c5ef2-5e03-4d29-8666-f2b34b1bcc92
d649dcb
Review feedback disposition for
|
Review feedback disposition follow-up for
|
Keep the visible Copied state for two seconds while retaining the atomic status announcement for five seconds. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 068c5ef2-5e03-4d29-8666-f2b34b1bcc92
|
Duration follow-up completed in
The existing human approval was against the main-merged head immediately before this focused duration commit. No review was dismissed or re-requested automatically. No ADO follow-up was needed because the concern was directly related and addressed in scope. |
Preserve both accessibility changelog entries while integrating the latest main branch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 068c5ef2-5e03-4d29-8666-f2b34b1bcc92
Head branch was pushed to by a user without write access
|
Merge conflict resolved in
No review feedback was rejected or deferred, no ADO follow-up was needed, and no reviews were dismissed or re-requested. GitHub now reports the PR as mergeable; required checks are running on the new head. |
|
Note on failing checks: both failures appear unrelated to my changes.
The Copy confirmation tests and the related message-actions accessibility test passed against the merged head. Based on the files, execution paths, and failure details, these are independent snapshot/timing flakes rather than regressions caused by #5864. |
|
The failing checks are infrastructure failures, not failures in the code.
|
Eugene (OEvgeny)
left a comment
There was a problem hiding this comment.
Aside from possibly adjusting how the "copied" text is surfaced to the user, this also leaks the element into state and complicates the layout via introducing portalling which could further affect accessibility beyond the fix.
Store the stable portal target in a ref and drive the copied CSS class through component state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 068c5ef2-5e03-4d29-8666-f2b34b1bcc92
|
Review follow-up implemented and validated in
|
|
Compulim thread follow-up completed for current head
GitHub did not permit |
Render the persistent atomic status beside the copy button instead of portalling it to the Web Chat root. Verify timing, repeated activation, DOM placement, and accessibility-tree isolation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b8e1fda2-b670-478a-9180-9649e1365b2f
|
Addressed this concern in The portal and DOM target ref are removed. The persistent, atomic The browser regression test now verifies that the status:
Validation against the pushed change:
This provides live DOM, timing, repeated-activation, layout, and accessibility-tree evidence that removing the portal does not broaden accessible names or alter layout. Automated browser checks cannot prove Narrator speech output, so a final Edge/Narrator spot check remains the manual verification boundary. |

CopytoCopiedand rapidly back toCopy.Observed on both foreground activations: Narrator started reading the changing button name, but the rapid reversion interrupted the confirmation and sounded like
Copy Copy button. Agent Builder's accessibility tree exposedCopiedas button content, with no separatestatusnode. This reproduces the reported failure and matches the timing mechanism in the upstream Copy implementation.Validation Validated the current head
6e65db8ff4b93f8553bf10f38b516824dc5cfc61from an archive of the exact working tree. The review follow-up stores the stable portal target in a ref and drives the copied CSS class through React state without changing the two-second visual or five-second assistive-technology lifetimes. -npm clean-install --userconfig .npmrc && npm run build: passed in the isolated Linux environment. -npm run precommit:typecheck --workspace ./packages/component: passed. -./node_modules/.bin/eslint --report-unused-disable-directives --max-warnings 0 packages/component/src packages/test/harness/src: passed. - Changed-file Prettier checks: passed. -git diff --check: passed. - Selenium Grid startup: passed with two Chrome nodes reportedUP. -npm test -- --testPathPattern "__tests__/html2/accessibility/messageActions\\.html$": passed, 1 suite and 1 test, covering the related message-action accessibility change merged frommain. -npm test -- --testPathPattern "__tests__/html2/copyButton/behavior\\.html$": passed, 1 suite, 1 test, and 3 snapshots. -npm test -- --testPathPattern "__tests__/html2/copyButton/behavior.hideAndShow\\.html$": passed, 1 suite, 1 test, and 3 snapshots. -npm test -- --testPathPattern "__tests__/html2/copyButton/layout\\.html$": passed, 1 suite, 1 test, and 1 snapshot. - Manual Windows Narrator validation previously passed for primary activation: Narrator announced the focused Copy button asCopied. The new change preserves the same 5-second atomic status lifetime. The shorter 2-second visual lifetime has not been manually rechecked with Narrator because it does not control the status announcement. - Rapid repeated activation and duplicate-speech behavior were not separately verified manually. - Selenium sessions, containers, networks, volumes, generated outputs, archives, and dependencies were removed after validation. ### Regression Coverage -behavior.htmlverifies the confirmation remains visible after 1 second, becomes hidden after 2 seconds, and retains the root-level atomic status until 5 seconds. It also verifies placement outsidearia-labelledbyancestors and the shared live region, repeated activation, and independent cleanup. -behavior.hideAndShow.htmlverifies the visual confirmation remains visible after 1 second, returns to normal after 2 seconds, and stays normal after Web Chat is hidden and shown. -layout.htmlverifies Fluent-themed confirmation visibility after 1 second and cleanup after 2 seconds. - [x] I have added tests and executed them locally - [x] I have updatedCHANGELOG.md- [ ] I have updated documentation No user-facing documentation change is required beyond the changelog. ## Review Checklist > This section is for contributors to review your work. - [x] Accessibility reviewed (tab order, content readability, alt text, color contrast) - [ ] Browser and platform compatibilities reviewed - [ ] CSS styles reviewed (minimal rules, noz-index) - [ ] Documents reviewed (docs, samples, live demo) - [ ] Internationalization reviewed (strings, unit formatting) - [ ]package.jsonandpackage-lock.jsonreviewed - [ ] Security reviewed (no data URIs, check for nonce leak) - [ ] Tests reviewed (coverage, legitimacy)