nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.12k stars 637 forks source link

Duplicate announcement for dialog built with Qt 5.11+ #12035

Open mitchellloftus opened 3 years ago

mitchellloftus commented 3 years ago

Steps to reproduce:

  1. Open NVDA
  2. Launch the attached application
  3. Click the "Click me!" button
  4. Observe

Actual behavior:

NVDA reads out the dialog information twice (e.g. "Critical message dialog, This is a critical message, OK button, Enter, Critical message dialog, This is a critical message, OK button, Enter")

Expected behavior:

NVDA reads out the dialog information once (e.g. "Critical message dialog, This is a critical message, OK button, Enter")

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2020.3

Windows version:

Windows 10 version 1909

Name and version of other software in use when reproducing the issue:

Any application built with Qt 5.11+ (which uses UI Automation rather than MSAA)

Other information about your system:

N/A

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.

Same behavior with 2019.2.1 and 2019.3.1 (both portable)

If addons are disabled, is your problem still occuring?

Yes

Did you try to run the COM registry fixing tool in NVDA menu / tools?

Yes

Additional info

Example application

double_readout_example.zip double_readout double_readout_designer_preview

feerrenrut commented 3 years ago

Thanks for raising this @mitchellloftus, I note this is your first issue, so welcome to the NVDA project 🎉

michaelDCurran commented 2 years ago

Qt is most definitely firing many duplicate UIA focus events here:

Input: kb(laptop):space
INFO - UIAHandler.UIAHandler.IUIAutomationFocusChangedEventHandler_HandleFocusChangedEvent (17:23:40.639) - Dummy-2 (19520):
UIA focus: OK button
INFO - UIAHandler.UIAHandler.IUIAutomationFocusChangedEventHandler_HandleFocusChangedEvent (17:23:40.639) - Dummy-1 (448):
UIA focus: OK button
INFO - UIAHandler.UIAHandler.IUIAutomationFocusChangedEventHandler_HandleFocusChangedEvent (17:23:40.645) - Dummy-2 (19520):
UIA focus: Critical message window
INFO - UIAHandler.UIAHandler.IUIAutomationFocusChangedEventHandler_HandleFocusChangedEvent (17:23:40.655) - Dummy-2 (19520):
UIA focus: OK button

In short, twice on the Ok button, then once on the dialog, and then again once on the Ok button.

I would expect it to be once on the dialog and then once on the Ok button.