nvaccess/nvda

MS teams: NVDA does not announce the deleted character in compose box of personal/group chat.

Opened this issue · 12 comments

Steps to reproduce:

  • Open the MS team and navigate to personal/group chat.
  • open the personal/group chat and type anything.
  • now, use "Backspace" to delete the typed characters.

Actual behavior:

NVDA does not announce the deleted character, but the character gets deleted.

Expected behavior:

NVDA should announce the deleted character.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

NVDA 2023.2-Beta 2

Windows version:

Windows 11.

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

Microsoft Teams Version 1.6.00.20074 (64-bit).

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.

working well with 2023.1

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?

Yes

I can confirm the issue with latest version of teams. it doesn't occur 100% of the times, but it is quite frequent. It happens more frequently the first time we type something after the field receiving focus.

I just noticed this issue using 2023.2 beta 3. It also occurs when composing a new public message or reply from within a channel. I also notice that I occasionally hear the expected characters but usually they are not announced.

Will this be solved by #14888? cc: @michaelDCurran

Have you by any chance set the NvDA advnaced option to access Chromium documents via UI Automation? This would cause Teams to be accessed by UI Automation also. And when doing this, I do see an error when backspacing:

ERROR - scriptHandler.executeScript (18:54:24.271) - MainThread (10012):
error executing script: <bound method EditableText.script_caret_backspaceCharacter of <NVDAObjects.Dynamic_ChromiumUIAEditableTextWithAutoSelectDetectionUIA object at 0x05879A30>> with gesture 'backspace'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 295, in executeScript
  File "editableText.pyc", line 282, in script_caret_backspaceCharacter
  File "editableText.pyc", line 264, in _backspaceScriptHelper
  File "NVDAObjects\UIA\web.pyc", line 190, in move
  File "NVDAObjects\UIA\web.pyc", line 181, in _collapsedMove
  File "NVDAObjects\UIA\web.pyc", line 148, in _moveToEdgeOfReplacedContent
  File "baseObject.pyc", line 41, in __get__
  File "NVDAObjects\UIA\web.pyc", line 119, in _get_UIAElementAtStartWithReplacedContent
  File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__
_ctypes.COMError: (-2147467259, 'Unspecified error', (None, None, None, 0, None))

However, by default NVDA will be using IAccessible2, which for me works fine when backspacing.

If you have definitely not forced NVDA to use UI Automation in Teams, you may want to try increasing the Caret movement timeout value in NVDA's advanced settings. If this solves the problem we can consider increasing the timeout for this situation or more broadly.

The advance setting "Use UIA with Microsoft Edge and other Chromium-based browsers when available" was initially set to the option " default (used only when necessary)". I attempted to change the setting to "No," but the issue persisted.
Also, As suggested above, I adjusted the "Caret movement timeout (in ms)" from 100 to 200, resulting in a delayed announcement of deleted characters .

However, I noticed a particular problem with this adjustment: it fails to announce the first character of a word. For instance, if you attempt to delete the word "Hello," the initial character "H" will not be announced. Moreover, if someone attempts to delete characters rapidly using the "Backspace" key, the announcement of the deleted characters will not be accurate.

The initial description of this issue suggests that this is a regression in 2023.2. Could someone experiencing this definitely confirm that removed characters were announced in 2023.1, and they no longer are in 2023.2? In that case this should probably be re-prioritised.

I wonder whether #14708 or #14928 do influence this? These are the only PRs that made it into 2023.2 that I imagine could affect the carret and focus movement in Teams.

Testing with NVDA last alpha, caret timeout is at the default value.
This issue is still reproducible with Teams Classic.

However in the new Teams app (mini Teams) the characters are reported when using backspace apart from the very first character in the edit field which is the last to be deleted, is still not announced.
For example deleting the word hello with backspace reports everything until h and h is not reported. Increasing the caret timeout in advanced settings doesn't help.
I have tested with Teams Client version 23306.3309.2530.1346.

@Adriani90 Since this is reproducible for you, could you test the same scenarios with 2023.1? This will allow us to understand if this is a regression in NVDA or not.

This particular issue seems to have started in 2023.2.
Here are my testing results with NVDA 2023 versions.

  1. Teams Mini, new Teams app:
  • all NVDA 2023 versions do not announce the very first character in the edit field when deleting with backspace, but all other characters are reported properly.
  • Deleting characters very fast with backspace results in some characters not being reported or NVDA reports "blank" for some characters that disappear too fast from the screen.
  1. Teams Classic:
  • NVDA 2023.2 and higher including last alpha do not announce any characters when backspacing.
  • NVDA 2023.1 same results as described above for Teams Mini.

Note that Teams classic will be discontinued as of end of June 2024 at latest for anyone, so users will be updated to the new Teams automatically. See this source:
https://learn.microsoft.com/en-us/microsoftteams/new-teams-automatic-upgrade-announced

@jcsteh maybe you have any suggestions on how to solve this regression on a broader basis since you know in more detail how the key hook related behaviors could influence this. It might be useful for other applications as well.

The only thing i can think is that the timing is different now. NVDA probably doesn't wait quite as long as it did previously. Increasing the caret movement timeout should fix this and maybe this is something that will need to be done in a Teams app module or similar.

@gauravahir28, you noted a problem when backspacing the first character of a word in current NVDA versions with the timeout set to 200 ms. Can you reproduce this in 2023.1 with the caret movement timeout set to 100?