nvaccess / nvda

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

MS Word: Formatting toggle incorrectly announced when cursor in front of text #16412

Closed michaelweghorn closed 7 months ago

michaelweghorn commented 7 months ago

Steps to reproduce:

  1. start NVDA
  2. start MS Word
  3. type
  4. Type "hello world"
  5. move text cursor to the beginning of the text
  6. press Ctrl+B (in English UI) to enable bold formatting (for newly typed text)

Actual behavior:

NVDA announces "Bold off", even though bold is now enabled for newly typed text, as the button in the toolbar/ribbon shows.

Interestingly, the Speech Viewer output seems to first have the correct, then the incorrect state (and maybe only the last one is announced?):

ctrl+b
Bold on
Bold Off

Expected behavior:

NVDA should announce "Bold on".

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

running from source

NVDA version:

git master as of commit 11a2b4f1dba2d1503c61a32a41124929fb7c4702

Windows version:

Windows 10 22H2 (OS Build 19045.4291)

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

Microsoft® Word LTSC MSO (16.0.14332.20678) 64-bit (Microsoft Office LTSC Professional Plus 2021)

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.

no

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

n/a

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

n/a

CyrilleB79 commented 7 months ago

Not tested but the issue is very likely an erroneous UIA notification from Word.

What is the result with Narrator? If "bold off" is heard, the issue should be reported to Microsoft.

Regarding the impact of this issue in NVDA. Have you identified other cases where this notification is incorrect? In the past, it was incorrect when between two spaces, but it has been fixed since then. What is the most general case in which this issue occurs according to you?

michaelweghorn commented 7 months ago

Thanks for the quick reply!

Not tested but the issue is very likely an erroneous UIA notification from Word.

What is the result with Narrator? If "bold off" is heard, the issue should be reported to Microsoft.

Indeed, Narrator also incorrectly reports "bold off". Should this issue be closed then? (Maybe it's even fixed in a newer MS Office version, I just have Office 2021 LTSC available.)

Regarding the impact of this issue in NVDA. Have you identified other cases where this notification is incorrect? In the past, it was incorrect when between two spaces, but it has been fixed since then. What is the most general case in which this issue occurs according to you?

I'm neither a regular Word nor NVDA user, but ran into a similar issue when implementing reporting of formatting toggling for LibreOffice Writer (see https://github.com/nvaccess/nvda/pull/16413 - the earlier approached mentioned in there was relying on text attributes and had the issue). I then tested with Word and noticed this similar issue (though possibly with a different root cause) and reported it here, but am otherwise not really affected by this myself.

CyrilleB79 commented 7 months ago

OK. If no one can test, I'll test on a more recent Office version tonight to see if it is fixed.

CyrilleB79 commented 7 months ago

Actually your build number is quite old, probably because of LTSC channel.

On my side, the issue seems fixed with Microsoft® Word 2016 MSO (Version 2403 Build 16.0.17425.20176) 32 bits.

Thus I'll close this issue since the fix has been released on MS side.

michaelweghorn commented 7 months ago

Thanks for checking! Good to hear that this is fixed in newer builds.