nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.07k stars 624 forks source link

Incorrect Announcement of "Connect" and "Disconnect" Status at various point while connecting to Bluetooth Hearing Aids on "Add Device" Page by NVDA #16836

Open msftedad opened 2 months ago

msftedad commented 2 months ago

Pre-Requisites:

To repro below issue we should be having LE devices (Low Energy) such as Bluetooth ear buds, earing aids with LE Audio support

Steps to reproduce:

  1. Open NVDA.
  2. Turn off Hearing Aids that was previously connected.
  3. Open Settings (Win + I) in windows.
  4. Tab to "Bluetooth & Devices" and press enter.
  5. Tab to "Add Device" and press enter.
  6. Tab to "Bluetooth" and press enter.
  7. Tab to your device and connect one hearing aid.
  8. Note the announcement of both "connect" and "disconnect" statuses after successful connection.
  9. If another hearing aid is detected, observe the announcement of "connect" and "disconnect" statuses again. Now Tab to "Connect" button and press enter.
  10. Upon connecting both hearing aids, note the simultaneous announcement of "connect" and "disconnect" statuses.

Actual behavior:

On the "Add Device" page, the status of "connect" and "not connected" is inaccurately announced multiple times while connecting Bluetooth hearing aid devices. When successful connection of one Hearing aid, NVDA announces both "connect" and "disconnect" statuses. Similarly, when the system discovers another hearing aid and prompts the user, it again announces "connect" and "disconnect" statuses. Furthermore, upon successful connection of both hearing aids, the system incorrectly announces "connect" and "disconnect" statuses simultaneously.

Expected behavior:

In "Add Device" page, the NVDA should accurately announce the status of "connect" or "disconnect" only when relevant and avoid simultaneous announcements of conflicting statuses.

NVDA logs, crash dumps and other attachments:

https://github.com/nvaccess/nvda/assets/93735775/86d8f8f5-f061-4b77-8535-41ef00ca27e7

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

2024.2

Windows version:

Windows 11 Enterprise 23H2 (22631.3737)

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

Other information about your system:

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.

NA

If NVDA add-ons are disabled, is your problem still occurring?

NA

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

NA

Adriani90 commented 2 months ago

cc: @josephsl I guess this is due to the UIA notifications handler in NVDA, don't know if it can be fixed that easy. Do you have any insights on this one?

cc: @gerald-hartig

josephsl commented 2 months ago

Hi,

This comes from live region change event. At the moment NVDA does announce this whereas Narrator doesn't. If the live region is supposed to be announced by screen readers (in this situation), then NVDA's behavior is correct.

To Microsoft staff: whenever you find a possible or actual issue with NVDA, please test with Narrator also and see if the behavior you observe with both screen readers is what is supposed to happen or not. Thanks.

msftedad commented 1 month ago

Hi @josephsl, the live events are announced by NVDA multiple times which is incorrect, while Narrator and JAWS are doing the announcement only once which is the expected behavior. Please refer the attached behavior with Narrator.

https://github.com/nvaccess/nvda/assets/93735775/6f46b7e7-ba7b-4688-97f9-748883f519be

josephsl commented 1 month ago

Hi,

It appears "connect"/"disconnect" announcements come from UIA elements without UIA Automation Id defined. I think I have a solution from NVDA side, but can you ask the Windows Settings app team at Microsoft to try:

  1. Create a new Windows dev branch (preferably a feature branch level (FBL) of at least two or three (to isolate the issue from other Vibranium backport/Nickel backport/Zinc/Germanium/Dilithium/Selenium work).
  2. In the source code for systemsettings.exe (the one dealing with XAML definitions for connect/disconnect UI element), create a UIA Automation Id for these elements.
  3. Compile the modified systemsettings.exe and either package it as a new Windows build or as a test (internal corpnet required) cumulative update.
  4. Test the modified executable with Narrator.

If Narrator is announcing "connect"/"disconnect" using the modified systemsettings.exe with Automation Id's added, then the issue has to do with UIA server side implementation, an issue that was brought up on this project several times. If Narrator is still not announcing connect/disconnect, then it might be using a condition that NVDA isn't aware of, something NVDA folks may need to look at.

Thanks for your considerations.

msftedad commented 1 month ago

@josephsl, We have recommended the steps to dependent team and asked to implement. Once the dependent team implements and provide us the information, we will promptly update you.Thanks