diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.cs b/src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.cs index 7da0309d6ea..c8bede8ac02 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/ComboBox.cs @@ -3058,6 +3058,11 @@ protected virtual void OnDropDownClosed(EventArgs e) AccessibilityObject.RaiseAutomationEvent(UiaCore.UIA.AutomationFocusChangedEventId); } + // Some accessibility tools (e.g., NVDA) could recognize ComboBox as IAccessible object + // and ignore UIA focus change event. For such cases we need to additionaly raise MSAA focus event. + // childID = CHILDID_SELF - 1 (the -1 will resolve to CHILDID_SELF when we call NotifyWinEvent) + AccessibilityNotifyClients(AccessibleEvents.Focus, childID: -1); + // Notify Collapsed/expanded property change. AccessibilityObject.RaiseAutomationPropertyChangedEvent( UiaCore.UIA.ExpandCollapseExpandCollapseStatePropertyId,