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

UIA end of text is defined as last visible line #6453

Closed
carlos-zamora opened this issue Jun 10, 2020 · 7 comments
Closed

UIA end of text is defined as last visible line #6453

carlos-zamora opened this issue Jun 10, 2020 · 7 comments
Labels
Area-Accessibility Issues related to accessibility Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-1 A description (P1) Product-Conhost For issues in the Console codebase
Milestone

Comments

@carlos-zamora
Copy link
Member

carlos-zamora commented Jun 10, 2020

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable): master 9ce884c4

Any other software?

Steps to reproduce

This is in ConHost and Terminal.

  1. generate output (run dir then dir /?)
  2. using NVDA get the current line
  3. scroll up a few lines
  4. use NVDA to read the previous line
  5. repeat step 4 until you're on the last visible line
  6. use NVDA to read the next line

Expected behavior

Reads the next line.

Actual behavior

Refuses to read the next line because you are "at the bottom".

@carlos-zamora carlos-zamora added Product-Conhost For issues in the Console codebase Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Accessibility Issues related to accessibility labels Jun 10, 2020
@carlos-zamora carlos-zamora added this to the Terminal v2.0 milestone Jun 10, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jun 10, 2020
@DHowett DHowett modified the milestones: Terminal v2.0, 21H1 Jun 11, 2020
@DHowett
Copy link
Member

DHowett commented Jun 11, 2020

Moved from terminal 2.0 to 21H1 because it's a conhost bug.

@DHowett DHowett added Priority-1 A description (P1) Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 11, 2020
@carlos-zamora
Copy link
Member Author

Just tested this in Terminal. It repro's there too.

@codeofdusk
Copy link
Contributor

codeofdusk commented Aug 15, 2020

NVDA bounds UIA to the visible text. Otherwise we'd get thousands upon thousands of blank lines at the end of output.

@DHowett
Copy link
Member

DHowett commented Aug 15, 2020

That’s helpful to know. Since the traditional console can have text that’s below the viewport (whereas terminal cannot), how does the user discover that there is additional content? Is it an uncommon-enough use case that it doesn’t matter much?

@codeofdusk
Copy link
Contributor

I've never run into this.

Would it be possible to remove the literally thousands of empty lines from UIA? It slows down our diffing algorithm and sometimes I can get lost in all the blanks! If so I could take out the visible range bounding...

@codeofdusk
Copy link
Contributor

Maybe this is part of what's causing #5481? (in any case, if we don't have to bound to the visible ranges any more that issue would be mitigated).

@carlos-zamora
Copy link
Member Author

I'm actually going to close this. This is specific to NVDA. Narrator, Inspect.exe, and Accessibility Insights don't do this. This is just NVDA bounding UIA to the visible text to improve performance.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Sep 30, 2020
seanbudd pushed a commit to nvaccess/nvda that referenced this issue Jul 22, 2021
Summary of the issue:
Before recent upstream work, NVDA needed a custom TextInfo implementation including workarounds for the console. Notably, it was necessary to restrict the text range to visible content, as the console contained thousands of empty lines which both slowed down diffing and disorientated the user. This is no longer necessary as the console's UIA text range now ends at the last actual character (i.e. no more extraneous empty lines).

This bounding to the visible ranges can sometimes lead to choppy speech output, as full screen refreshes (such as in pagers or full-screen editors) cause text discontinuity, resulting in the diff algorithms losing context about which parts of the text are new. It breaks precedent from the rest of NVDA: in Word or web documents, for instance, the review cursor is not bounded to the visible text and the entire document can be freely explored. Despite the documentation of the scrolling commands in the user guide, the need to scroll consoles in particular, in strict contrast to the behaviour in other applications, has caused user confusion (microsoft/terminal#6453 and private correspondance with various users) and the commands don't work consistently in any case. In microsoft/terminal#6453 (comment) it was pointed out that consoles can have text that appears below the visible content, which is currently inaccessible to NVDA due to bounding.

Description of how this pull request fixes the issue:
Switches consoles where apiLevel is FORMATTED to use the default TextInfo implementation (i.e. no customization at the UIA text range level). Also use UIATextInfo in Windows Terminal as it never contained thousands of empty lines, making the overrides unnecessary there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-1 A description (P1) Product-Conhost For issues in the Console codebase
Projects
None yet
Development

No branches or pull requests

3 participants