Skip to content

Explain the emulated screen reader action in the primary action tests and remove the NVDA test - #6022

Merged
Eugene (OEvgeny) merged 3 commits into
mainfrom
OEvgeny/fix-primary-action-tests-nvda
Nov 6, 2026
Merged

Eugene (OEvgeny) merged 3 commits into
mainfrom
OEvgeny/fix-primary-action-tests-nvda

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #6020, as promised in the review thread.

Changelog Entry

Fixed

  • 👷🏻 Fixed screen reader primary action tests: removed the NVDA test, which clicked an element no screen reader can reach, and explained the emulated action, in PR #6022, by @OEvgeny

Description

In #6020, the tests emulate a screen reader's "primary action" with click(), and William Wong (@compulim) asked what they test. Narrator (UI Automation Invoke) and NVDA's ENTER in browse mode (IAccessible2 doAction) both ask the browser for the accessibility default action, which Chromium turns into a click on the active descendant itself. Neither WebDriver nor the Chrome DevTools Protocol can run that action, so the tests have to emulate it.

The .nvda.html test clicked the active descendant's first child. That child is aria-hidden, so no screen reader can reach it: the path only existed with #4041's markup. The test only repeated the Narrator test.

Specific Changes

  • focusAttachment.screenReaderPrimaryAction.windowsNarrator.html and part-grouping/primaryAction.windowsNarrator.html: the WHEN comment now names the real screen reader call and says why click() emulates it

  • Removed focusAttachment.screenReaderPrimaryAction.nvda.html and its 3 snapshots

  • No product change

  • I have added tests and executed them locally

  • I have added .changelog/<PR#>-<slug>.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov added 2 commits November 5, 2026 13:43
… NVDA test

Narrator (UI Automation Invoke) and NVDA (IAccessible2 doAction) both run the browser's accessibility default action, which Chromium turns into a click on the active descendant. The NVDA test clicked the active descendant's first child, which is aria-hidden and unreachable by any screen reader, so it only repeated the Narrator test.
@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review November 6, 2026 06:49
Copilot AI balanced review requested due to automatic review settings November 6, 2026 06:49

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@OEvgeny
Eugene (OEvgeny) merged commit 5befdf9 into main Nov 6, 2026
46 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-primary-action-tests-nvda branch November 6, 2026 22:33
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.

3 participants