Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Outlook emails, textInfos report inconsistent text in some cases #16448

Open
mltony opened this issue Apr 25, 2024 · 2 comments
Open

In Outlook emails, textInfos report inconsistent text in some cases #16448

mltony opened this issue Apr 25, 2024 · 2 comments
Labels
app/microsoft-office audience/nvda-dev PR or issue is relevant to NVDA / Add-on developers blocked/needs-external-fix p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@mltony
Copy link
Contributor

mltony commented Apr 25, 2024

Steps to reproduce:

  1. In NVDA Advanced preferences disable UIA for MS Word.
  2. 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 then downArrow. That's actually an empty paragraph.
  3. 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

@Adriani90
Copy link
Collaborator

@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.

@seanbudd seanbudd added p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. audience/nvda-dev PR or issue is relevant to NVDA / Add-on developers blocked/needs-external-fix app/microsoft-office labels Apr 29, 2024
@mltony
Copy link
Contributor Author

mltony commented May 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/microsoft-office audience/nvda-dev PR or issue is relevant to NVDA / Add-on developers blocked/needs-external-fix p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

3 participants