Hi,
Likely an oversight after introduction of event_selection routine:
Steps to reproduce:
Prerequisite: Windows 11 (any version), NVDA 2024.4.2/2025.1 RC or any release with event_selection implemented in the base NVDA object. Ideally, speech debug log category should be enabled:
- Start NVDA.
- Press Windows+Period (.) to open emoji panel.
- Move around the emoji panel with arrow keys.
Actual behavior:
NVDA announces emoji panel items twice.
Expected behavior:
NVDA announces items once.
NVDA logs, crash dumps and other attachments:
Situation: Windows 11 emoij panel opens, right arrow is pressed to move to an item (setup: speech and UIA debug log categories enabled, NVDA 2025.2 apha, Windows 11 24H2 (see full veriosn info below).
Input: kb(laptop):rightArrow
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.391) - Dummy-5 (28248):
handleAutomationEvent called with event SelectionItem_ElementRemovedFromSelection for element Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.391) - Dummy-5 (28248):
checking if is native UIA element: Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.391) - Dummy-5 (28248):
Locating nearest ancestor windowHandle for element Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.408) - Dummy-5 (28248):
Found ancestor element with valid windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isUIAWindow (06:05:55.408) - Dummy-5 (28248):
Found cached is UIA window True for hwnd hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.409) - Dummy-5 (28248):
treating element as native due to windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource.
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.409) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.409) - Dummy-5 (28248):
Checking if should accept NVDA event stateChange with window hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - NVDAObjects.UIA.UIA.init (06:05:55.413) - Dummy-5 (28248):
No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.414) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element Emoji list with automationID expanded-view-list-Emoji-Most%20frequently%20used, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.418) - Dummy-5 (28248):
handleAutomationEvent: created object <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x092F8550>
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.418) - Dummy-5 (28248):
handleAutomationEvent: queuing NVDA event stateChange for NVDAObject <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x092F8550>
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.419) - Dummy-5 (28248):
handleAutomationEvent called with event SelectionItem_ElementSelected for element 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.420) - Dummy-5 (28248):
checking if is native UIA element: 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.420) - Dummy-5 (28248):
Locating nearest ancestor windowHandle for element 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.423) - Dummy-5 (28248):
Found ancestor element with valid windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isUIAWindow (06:05:55.423) - Dummy-5 (28248):
Found cached is UIA window True for hwnd hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.423) - Dummy-5 (28248):
treating element as native due to windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource.
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.423) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.423) - Dummy-5 (28248):
Checking if should accept NVDA event UIA_elementSelected with window hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - NVDAObjects.UIA.UIA.init (06:05:55.427) - Dummy-5 (28248):
No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.428) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element Emoji list with automationID expanded-view-list-Emoji-Most%20frequently%20used, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.432) - Dummy-5 (28248):
handleAutomationEvent: created object <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x08BEA730>
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.432) - Dummy-5 (28248):
handleAutomationEvent: queuing NVDA event UIA_elementSelected for NVDAObject <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x08BEA730>
IO - inputCore.logTimeSinceInput (06:05:55.440) - MainThread (28268):
0.059 sec since input
IO - speech.speech.speak (06:05:55.440) - MainThread (28268):
Speaking ['🤔', '2 of 12', CancellableSpeech (still valid)]
DEBUG - NVDAObjects.UIA.UIA.init (06:05:55.450) - MainThread (28268):
No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.451) - MainThread (28268):
Locating nearest ancestor windowHandle for element Emoji and more menu pane with automationID Windows.Shell.InputApp.SuggestionUI.WebView, className WebView and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.454) - MainThread (28268):
Found ancestor element with valid windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
IO - inputCore.logTimeSinceInput (06:05:55.470) - MainThread (28268):
0.089 sec since input
IO - speech.speech.speak (06:05:55.471) - MainThread (28268):
Speaking ['🤔', '2 of 12', CancellableSpeech (still valid)]
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-36759,1b563fd4
Windows version:
Windows 11 24H2beta (build 26120.4250)
Name and version of other software in use when reproducing the issue:
N/A
Other information about your system:
Used as a development workstation
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
Problem exists with NVDA releases with event_selection implemeneted (2024.x), reproducible in 2024.4.2 and 2025.1 RC
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not applicable
Technical information
Cause:
NVDA's modern keyboard includes event handler for UIA element selected event. This event handler will report the currently selected emoji panel item via reportFocus method and braille text routine. This works if emoji panel items are not focusable which is the case for Windows 10. However, in Windows 11, focus will move to emoji panel search box when the panel opens. Because the base event_selection routine will announce selected item if the item lives inside a focusable container control (such as Windows 11 emoji panel), items will be announced twice: once in the element selected routine in modern keyboard app module, and again when the base event_selection implementation is invoked thanks to system focus movement.
Possible solutions:
Either:
- Create an overlay class for Windows 11 emoji panel item object and let the object handle element selected event itself.
- In the app module version of UIA element selected event handler, do not report focus (or braille item information) if this is Windows 11 and the emoji panel gains focus.
- Call nextHandler() if this is an item under categories such as emoji and GIFs.
Additionally, this issue occurs when browsing emojis and GIFs and these items expose different UI Automation Ids. Because Microsoft may add more categories in the future, the next handler method or overlay class implementation may not be feasible.
Thanks.
Hi,
Likely an oversight after introduction of event_selection routine:
Steps to reproduce:
Prerequisite: Windows 11 (any version), NVDA 2024.4.2/2025.1 RC or any release with event_selection implemented in the base NVDA object. Ideally, speech debug log category should be enabled:
Actual behavior:
NVDA announces emoji panel items twice.
Expected behavior:
NVDA announces items once.
NVDA logs, crash dumps and other attachments:
Situation: Windows 11 emoij panel opens, right arrow is pressed to move to an item (setup: speech and UIA debug log categories enabled, NVDA 2025.2 apha, Windows 11 24H2 (see full veriosn info below).
Input: kb(laptop):rightArrow
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.391) - Dummy-5 (28248):
handleAutomationEvent called with event SelectionItem_ElementRemovedFromSelection for element Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.391) - Dummy-5 (28248):
checking if is native UIA element: Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.391) - Dummy-5 (28248):
Locating nearest ancestor windowHandle for element Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.408) - Dummy-5 (28248):
Found ancestor element with valid windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isUIAWindow (06:05:55.408) - Dummy-5 (28248):
Found cached is UIA window True for hwnd hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.409) - Dummy-5 (28248):
treating element as native due to windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource.
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.409) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element Emoji 👍 list item with automationID item-Emoji-0-4e6a6cdc-5b3e-4186-84b8-78cb410d903e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.409) - Dummy-5 (28248):
Checking if should accept NVDA event stateChange with window hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - NVDAObjects.UIA.UIA.init (06:05:55.413) - Dummy-5 (28248):
No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.414) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element Emoji list with automationID expanded-view-list-Emoji-Most%20frequently%20used, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.418) - Dummy-5 (28248):
handleAutomationEvent: created object <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x092F8550>
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.418) - Dummy-5 (28248):
handleAutomationEvent: queuing NVDA event stateChange for NVDAObject <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x092F8550>
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.419) - Dummy-5 (28248):
handleAutomationEvent called with event SelectionItem_ElementSelected for element 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.420) - Dummy-5 (28248):
checking if is native UIA element: 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.420) - Dummy-5 (28248):
Locating nearest ancestor windowHandle for element 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.423) - Dummy-5 (28248):
Found ancestor element with valid windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isUIAWindow (06:05:55.423) - Dummy-5 (28248):
Found cached is UIA window True for hwnd hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - UIAHandler.UIAHandler.isNativeUIAElement (06:05:55.423) - Dummy-5 (28248):
treating element as native due to windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource.
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.423) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element 🤔 list item with automationID item-Emoji-0-d061e4f5-7297-429d-ac7b-831d8433509e, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.423) - Dummy-5 (28248):
Checking if should accept NVDA event UIA_elementSelected with window hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
DEBUG - NVDAObjects.UIA.UIA.init (06:05:55.427) - Dummy-5 (28248):
No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.428) - Dummy-5 (28248):
Got previously cached nearest windowHandle of hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource for element Emoji list with automationID expanded-view-list-Emoji-Most%20frequently%20used, className [None] and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.432) - Dummy-5 (28248):
handleAutomationEvent: created object <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x08BEA730>
DEBUG - UIAHandler.UIAHandler.IUIAutomationEventHandler_HandleAutomationEvent (06:05:55.432) - Dummy-5 (28248):
handleAutomationEvent: queuing NVDA event UIA_elementSelected for NVDAObject <NVDAObjects.Dynamic_EdgeNodeListItemUIA object at 0x08BEA730>
IO - inputCore.logTimeSinceInput (06:05:55.440) - MainThread (28268):
0.059 sec since input
IO - speech.speech.speak (06:05:55.440) - MainThread (28268):
Speaking ['🤔', '2 of 12', CancellableSpeech (still valid)]
DEBUG - NVDAObjects.UIA.UIA.init (06:05:55.450) - MainThread (28268):
No windowHandle for UIA NvDAObject. Searching UIA element ancestry for nearest windowHandle
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.451) - MainThread (28268):
Locating nearest ancestor windowHandle for element Emoji and more menu pane with automationID Windows.Shell.InputApp.SuggestionUI.WebView, className WebView and frameworkID MicrosoftEdge
DEBUG - UIAHandler.UIAHandler.getNearestWindowHandle (06:05:55.454) - MainThread (28268):
Found ancestor element with valid windowHandle hwnd 0X10552 of class Windows.UI.Core.CoreComponentInputSource
IO - inputCore.logTimeSinceInput (06:05:55.470) - MainThread (28268):
0.089 sec since input
IO - speech.speech.speak (06:05:55.471) - MainThread (28268):
Speaking ['🤔', '2 of 12', CancellableSpeech (still valid)]
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
alpha-36759,1b563fd4
Windows version:
Windows 11 24H2beta (build 26120.4250)
Name and version of other software in use when reproducing the issue:
N/A
Other information about your system:
Used as a development workstation
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
Problem exists with NVDA releases with event_selection implemeneted (2024.x), reproducible in 2024.4.2 and 2025.1 RC
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not applicable
Technical information
Cause:
NVDA's modern keyboard includes event handler for UIA element selected event. This event handler will report the currently selected emoji panel item via reportFocus method and braille text routine. This works if emoji panel items are not focusable which is the case for Windows 10. However, in Windows 11, focus will move to emoji panel search box when the panel opens. Because the base event_selection routine will announce selected item if the item lives inside a focusable container control (such as Windows 11 emoji panel), items will be announced twice: once in the element selected routine in modern keyboard app module, and again when the base event_selection implementation is invoked thanks to system focus movement.
Possible solutions:
Either:
Additionally, this issue occurs when browsing emojis and GIFs and these items expose different UI Automation Ids. Because Microsoft may add more categories in the future, the next handler method or overlay class implementation may not be feasible.
Thanks.