nvaccess / nvda

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

Braille in multiline UIA text fields shows text from different lines #12140

Open MarcoZehe opened 3 years ago

MarcoZehe commented 3 years ago

Steps to reproduce:

  1. With current NVDA alpha, install PowerShell 7.1.2 and/or Windows Terminal current release.
  2. Have a braille display connected and open a session.
  3. Use NVDA text review commands to review the output. Even the standard prompts are enough. Look on the braille display.

Actual behavior:

Text from different lines is being run together as one string of text, and the text of the current line is not started at the beginning of the braille display, as is the case in Powershell 5.1 that comes bundled with Windows 10.

Expected behavior:

Text would be broken up into lines.

System configuration

NVDA installed/portable/running from source:

Installed.

NVDA version:

NVDA version alpha-21845,db664bef

Windows version:

Version 20H2 (Build 19042.844)

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

PowerShell 7.1.2, Windows Terminal current release. Either one will reproduce the problem.

Other information about your system:

Braille display is a Handy Tech Active Star, but this shouldn't matter.

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.

Yes, happens with 2020.4, too.

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

Yes.

Did you try to run the COM registry fixing tool in NVDA menu / tools?

N/A.

@codeofdusk could this be related to the observation you made in https://github.com/nvaccess/nvda/issues/11172#issuecomment-696938093 where you got all the output from the terminal as one string of text? Should NVDA be more smart to filter by lines by searching for occurrences of ASCII 13 followed by ASCII 10? I see in my braille table that these Windows-style line separators are shown with corresponding dot patterns which are present in my braille table.

codeofdusk commented 3 years ago

@carlos-zamora This is a bug report from an NVDA user. My suspicion is that UIA text range move/expand to line is, for some reason, covering more than one line. Possibly related to microsoft/terminal#7960.

codeofdusk commented 3 years ago

@MarcoZehe To confirm this theory, could you please:

  1. Open a terminal where you're observing the Braille issues.
  2. Press NVDA+control+z.
  3. Paste the following line into the Python console that opens: list(nav.makeTextInfo("all").getTextInChunks("line"))
  4. Paste the result into a comment here.
    • When in the Python console, to focus the output, press f6.
MarcoZehe commented 3 years ago

Here you are:

['PowerShell 7.1.2', 'Copyright (c) Microsoft Corporation.', ' ', 'https://aka.ms/powershell', "Type 'help' to get help.", ' ', 'Warning: PowerShell detected that you might be using a screen reader and has disabled PSReadLine for compatibility purpo', "ses. If you want to re-enable it, run 'Import-Module PSReadLine'.", ' ', 'PS C:\\Users\\marco> z', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']
codeofdusk commented 3 years ago

Hmmm, that looks correct...

MarcoZehe commented 3 years ago

Hm, does Braille use a different method? Speech is reading line by line. It is only Braille that is not correct.

MarcoZehe commented 3 years ago

@codeofdusk I found this to be the case in the source code editor of Visual Studio 2019, currently v16.9.1, too. Speech gets it sorted nicely, Braille runs everything together in a big chunk, with the cursor often dcifficult to find.

CC also @leonardder @michaelDCurran

Adriani90 commented 4 months ago

@MarcoZehe are you still having this issue with NVDA 2024.3 Beta? @cary-rowen maybe could you test as well please?