Skip to content

fix: restore transcript screen reader primary action - #5867

Draft
ahonamatata wants to merge 2 commits into
microsoft:mainfrom
ahonamatata:users/asalsa/transcript-primary-action
Draft

ahonamatata wants to merge 2 commits into
microsoft:mainfrom
ahonamatata:users/asalsa/transcript-primary-action

Conversation

@ahonamatata

Copy link
Copy Markdown
Contributor

Problem

Screen readers could announce an interactive transcript activity but report that it had no primary action. Invoking the primary action did not move focus into controls such as Copy, Like, Dislike, or Adaptive Card inputs.

The transcript rewrite removed the guarded click handler introduced by #4041 while retaining only plain DOM Enter handling. This is a separate accessibility regression from #5865 and does not depend on that pull request.

Changes

  • Restore primary-action click handling on normal and grouped active descendants.
  • Reuse the existing focus-trap targets used by plain Enter.
  • Add HTML integration coverage for Narrator-style and NVDA-style click events, plain Enter, Escape, and grouped activities.
  • Add a changelog entry.

Validation

  • npm run precommit:eslint -- src in packages/component: passed.
  • npm run precommit:eslint -- src in packages/test/harness: passed.
  • npm run precommit:typecheck in packages/component: passed.
  • Prettier checks for changed source and HTML tests: passed.
  • git diff --check: passed.
  • npm test -- --testPathPattern '__tests__/html2/(transcript/navigation/focusAttachment\.screenReaderPrimaryAction|part-grouping/primaryAction)\.html$': 2 suites and 2 tests passed.

Manual testing

Edge Beta plus Narrator was unavailable in the current automation environment. Actual Narrator and NVDA validation remain unverified. The automated tests cover the documented primary-action event paths for both screen readers.

ahonamatata and others added 2 commits October 7, 2026 13:25
Copilot-Session: 77b2ba5a-efa7-4a5e-8a90-963dcdef81be

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 77b2ba5a-efa7-4a5e-8a90-963dcdef81be

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@OEvgeny

Copy link
Copy Markdown
Collaborator

Thanks for digging into this, ahonamatata. I checked it and would like to get it merged.

What I found:

  • The click handler from Screen reader: support "do primary action" #4041 was dropped in the transcript rewrite (Redo accessibility for transcript #4108). Both first shipped in 4.15.0, so no release since then handles a screen reader's "primary action" on a message.
  • Your two new tests fail with the product changes reverted (focus doesn't move into the message) and pass with them (3 of 3 runs), on your branch merged with main (before Convert tooltip, modal dialog, file attachment and transcript root classes to CSS modules #5997). The full html2 suite on that merge has no regressions: all 1,374 pages that run pass (32 skipped; 160 needed a re-run because of grid and network hiccups on my machine).
  • In Edge with UI Automation, the focused message on main and 4.19.2 has no Invoke pattern. With your change it has one, and invoking it moves focus to the Adaptive Card's text input. I haven't tried it with Narrator or NVDA yet.

To get it ready for review:

  1. Merge main. Convert tooltip, modal dialog, file attachment and transcript root classes to CSS modules #5997 just changed ActivityRow.tsx, so expect a small conflict there: keep main's lines and add your focusTrapTargetRef and targetRef lines. Git also moves your CHANGELOG.md line under 4.19.2 without a conflict; please remove it.
  2. Changelog: PRs now add a fragment instead of editing CHANGELOG.md. After the merge, run node ./scripts/changelog/new.mjs "<one short clause>", which writes .changelog/5867-<slug>.md (see .changelog/README.md).
  3. Tests: add host.snapshot('local') after each focus change and keep one scenario per file, e.g. .windowsNarrator.html and .nvda.html as Screen reader: support "do primary action" #4041 had. Plain ENTER on an activity is already covered by focusAttachment.enterKey.html. A comment saying that click() emulates the screen reader would help.
  4. Use the PR template (Changelog Entry, Description, Design, Specific Changes), then mark it ready for review.

Since edits from maintainers are enabled, I can push the fragment and snapshots to your branch if you like. Just say so.

This branch has not been deployed

No deployments
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.

2 participants