nvda
nvda copied to clipboard
In Outlook emails, textInfos report inconsistent text in some cases
Steps to reproduce:
- In NVDA Advanced preferences disable UIA for MS Word.
- Open an Outlook email, see email attached, just remove the .zip characters at the end to open the email.
3.Go to the second paragraph by pressing
control+home
thendownArrow
. That's actually an empty paragraph. - In NVDA python console:
>>> p=focus.treeInterceptor.makeTextInfo('caret')
>>> p.expand('paragraph')
>>> p.getTextWithFields()
[FieldCommand controlStart with {}, FieldCommand formatChange with {'text-position': <TextPosition.BASELINE: 'baseline'>}, '\n', FieldCommand controlEnd with {}]
>>> p.getTextWithFields()[2]
'\n'
>>> p.text
'\r\x07'
Actual behavior:
p.getTextWithFields()[2]
returns a different string from p.text
.
Expected behavior:
Text returned by p.text
and string elements of p.getTextWithFields()
- namely p.getTextWithFields()[2]
in this case - should be identical.
NVDA logs, crash dumps and other attachments:
N/A
System configuration
NVDA installed/portable/running from source:
Running from source.
NVDA version:
master
Windows version:
Windows 11
Name and version of other software in use when reproducing the issue:
N/A
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.
N/A
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?
N/A
Webinar.des.Monats.Forderung.durch.die.offentliche.Hand.msg.zip
@mltony just for completeness, in the email test case attached here unfortunately they use table cels for presentational / design purposes, but these empty cells are not having role="presentation", so NVDA interprets them as empty lines / paragraphs. So maybe there are some specific internals in textInfo on how NVDA threats paragrpahs / characters in table cells which might have to be changed or redesigned.
This issue also affects style navigation in MSWord without UIA - for more info see #16459. I observe exactly the same discrepancy between textInfo.text
and textInfo.getTextWithFields()
. However the issue with MSWord doesn't reproduce reliably on my computer - whereas the one with Outlook appears to be reliable.