Skip to content

fix(react): announce collapsed state when dropdown closes#36295

Open
VivekJariwala50 wants to merge 2 commits into
microsoft:masterfrom
VivekJariwala50:fix/36293-dropdown-collapsed-announcement
Open

fix(react): announce collapsed state when dropdown closes#36295
VivekJariwala50 wants to merge 2 commits into
microsoft:masterfrom
VivekJariwala50:fix/36293-dropdown-collapsed-announcement

Conversation

@VivekJariwala50

Copy link
Copy Markdown

Previous Behavior

When the Dropdown component is open and dismissed (e.g., by pressing the Escape key or clicking outside), Windows Narrator does not announce the new collapsed state of the combobox. This leaves screen reader users without confirmation that the dropdown has closed, failing accessibility standards (WCAG 2.1 / 2.2 SC 4.1.2 Name, Role, Value).

New Behavior

We integrated the standard @fluentui/react Announced component inside the Dropdown base rendering. The component monitors state transitions and fires a polite screen reader announcement ("collapsed") when the dropdown is dismissed.

An automated unit test has also been added under packages/react/src/components/Dropdown/Dropdown.test.tsx to verify that the collapsed status is announced upon dismissing the menu.

Related Issue(s)

@VivekJariwala50 VivekJariwala50 requested review from a team as code owners June 9, 2026 15:32
@VivekJariwala50

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

Pull request overview

This PR targets an accessibility gap in the v8 @fluentui/react Dropdown: when the listbox is dismissed, it adds a polite screen reader announcement of the collapsed state (to address Narrator not vocalizing the aria-expanded transition).

Changes:

  • Add an Announced live region to Dropdown rendering when transitioning from open → closed.
  • Add a unit test to verify "collapsed" is announced after dismissing via Escape.
  • Update the root jest.config.ts to use an ES import for getJestProjectsAsync.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/react/src/components/Dropdown/Dropdown.base.tsx Adds Announced rendering on close to announce the collapsed state.
packages/react/src/components/Dropdown/Dropdown.test.tsx Adds a test asserting a "collapsed" status announcement after Escape dismiss.
jest.config.ts Switches getJestProjectsAsync import style from require to import.

Comment thread packages/react/src/components/Dropdown/Dropdown.base.tsx
Comment thread packages/react/src/components/Dropdown/Dropdown.base.tsx
VivekJariwala50 and others added 2 commits June 10, 2026 13:33
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@VivekJariwala50 VivekJariwala50 force-pushed the fix/36293-dropdown-collapsed-announcement branch from 4fecc0b to a67f53d Compare June 10, 2026 17: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.

[Bug]: Dropdown - Narrator does not announce collapsed state after Escape dismiss

2 participants