Skip to content

[release/11.0] Fix inverted NoClientNotifications check in Control.AccessibilityNotifyClients - #15222

Merged
Shyam-Gupta merged 1 commit into
release/11.0from
backport/pr-15177-to-release/11.0
Oct 1, 2026
Merged

Shyam-Gupta merged 1 commit into
release/11.0from
backport/pr-15177-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #15177 to release/11.0

/cc @Shyam-Gupta @kastwey

Customer Impact

Testing

Risk

Microsoft Reviewers: Open in CodeFlow

…fyClients (#15177)

The rename of LocalAppContextSwitches to AppContextSwitches in #12840 dropped the
negation on this line (and only on this one of the seven that use the switch), so
controls only call NotifyWinEvent when the app has asked for NO client notifications,
that is, never by default. MSAA clients (JAWS among them) stopped receiving the
WinEvents raised through this method: menu popup start/end, focus of ToolStrip items,
state and selection changes, etc.

.NET 9:  if (IsHandleCreated && !LocalAppContextSwitches.NoClientNotifications)
.NET 10: if (IsHandleCreated && AppContextSwitches.NoClientNotifications)

Adds tests that listen to the WinEvent; the existing ones only checked that the
call did not throw.
@github-actions
github-actions Bot requested a review from a team as a code owner October 1, 2026 21:08
@Shyam-Gupta Shyam-Gupta self-assigned this Oct 1, 2026
@Shyam-Gupta Shyam-Gupta added the servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria label Oct 1, 2026
@Shyam-Gupta

Copy link
Copy Markdown
Member

Approved over email.

@Shyam-Gupta Shyam-Gupta added servicing-approved .NET Shiproom approved the PR for merge and removed servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria labels Oct 1, 2026

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 review overview

🟢 Approval recommended

The fix and regression tests are covered, with no unresolved blocking issues.

Review effort: Lite
Findings: None

What changed in this PR

Fixes the inverted NoClientNotifications check so MSAA WinEvents are raised by default and suppressed when opted out.

Changes:

  • Corrects notification gating logic.
  • Adds regression tests for event data and suppression.
File Description
src/​test/​unit/​System.Windows.Forms/​System/​Windows/​Forms/​ControlTests.AccessibilityNotifyClients.cs Adds WinEvent regression coverage.
src/​System.Windows.Forms/​System/​Windows/​Forms/​Control.cs Corrects notification gating.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Shyam-Gupta
Shyam-Gupta merged commit b49a706 into release/11.0 Oct 1, 2026
9 checks passed
@Shyam-Gupta
Shyam-Gupta deleted the backport/pr-15177-to-release/11.0 branch October 1, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

servicing-approved .NET Shiproom approved the PR for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants