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

Support mode to not redraw line for screen reader purposes #859

Open
SteveL-MSFT opened this issue Feb 20, 2019 · 11 comments
Open

Support mode to not redraw line for screen reader purposes #859

SteveL-MSFT opened this issue Feb 20, 2019 · 11 comments
Labels
Area-Accessibility Label for issues related to accessibility problems or improvements
Milestone

Comments

@SteveL-MSFT
Copy link
Member

Environment data

PS version: 6.2.0-preview.4
PSReadline version: 2.0.0-beta3
os: 10.0.18836.1002 (WinBuild.160101.0800)
PS file version: 6.2.0

Steps to reproduce or exception report

Enable Narrator on Windows. Start typing in PowerShell: dir

Currently, it reads: d, di, dir

Some users who type long command lines prefer not to read the entire line (this is reported by customers). Instead, they prefer it reads: d, i, r.

Narrator (and other screen readers) read what is sent to the console, so one option is to have a mode that doesn't re-render the line. This will have some side effects like not correctly supporting coloring, but this is opt-in for the purpose of screen readers so should be fine.

@lzybkr
Copy link
Member

lzybkr commented Feb 20, 2019

I think there is an issue on this already - but it's about performance.

I'm opposed to a mode that gets coloring wrong. If it's too unreasonable to ensure correct coloring (which probably isn't the case), then this mode should disable coloring completely.

Note that inserts not at the end of the line or any deletions would like result in reading the entire line unless the console exposing some way of hinting what the narrator should read.

@SteveL-MSFT
Copy link
Member Author

Disabling coloring completely in this mode seems fine.

@lzybkr
Copy link
Member

lzybkr commented Feb 20, 2019

Sure, but it doesn't solve the performance problem which is apparently noticeable over slow connections.

If you can kill 2 birds with one stone and avoid creating a new mode - that would be ideal.

@lzybkr
Copy link
Member

lzybkr commented Feb 20, 2019

And if you do go with a narration mode - it should be automatic, and shouldn't need a user visible option.

@SteveL-MSFT
Copy link
Member Author

I believe some users may want the current narration behavior which tries to read what is typed as a sentence to verify what you typed is correct. But the feedback is that there are a different set of users who don't want that for efficiency reasons and presumably they don't make typos. So I don't see how that can be automatic.

@lzybkr
Copy link
Member

lzybkr commented Feb 20, 2019

Well let me ask the question in a different way. Is there a way for any console application to tweak the narration experience? It seems a little unreasonable for a console application to add narration specific settings - that feels like a system setting.

@SteveL-MSFT
Copy link
Member Author

Last time I looked at this, there wasn't a way for a console app to interact directly with narrator (or the accessibility apis used). I've been informed by the people requesting this capability that Narrator specifically has a setting that enables reading the console per line instead of per character that shows up on the console (the default). Let me follow-up with the console team to see if they have plans to improve accessibility integration with the console.

@daxian-dbw daxian-dbw self-assigned this May 6, 2019
@SteveL-MSFT SteveL-MSFT removed their assignment Sep 2, 2020
@josephsl
Copy link

josephsl commented Sep 2, 2020

Hello everyone,

I'm a Narrator user and an NVDA developer. Based on a discussion with @@SteveL-MSFT, it appears it could be an issue involving both PSReadLine and screen readers. As of September 2020, I cannot reproduce the output noted above with NVDA at the moment.

My setup:

  • OS: Windows 10 20H2 beta (10.0.19042.487)
  • NVDA version: 2020.2 (stable) and alpha build
  • PowerShell: 7
  • NVDA settings: UIA used to access Windows Console applications.

Procedure:

  1. Start NVDA.
  2. Run PowerShell.
  3. Import PSReadLine.
  4. Press Insert+nubmer row 2 to turn off character echo from NVDA.
  5. Type "dir" (one letter at a time).

Expected: NVDA announces nothing, or if it announces things, it will not say, "d", "di", "dir".
Actual: same as above.

I'm thinking it may have to do with events, as whenever characters are entered, PowerShell fires UIA text change event. I'm guessing that Narrator is a bit aggressive when it comes to announcing what is seen on a line - attempting to announce all text if possible. NVDA calculates the diff between current and new text and only announces new text if possible (observed when running a command such as Git from WSL where a text on a single line changes frequently, such as when doing a Git pull).

Thanks. CC @LeonarddeR, @codeofdusk

@SteveL-MSFT
Copy link
Member Author

I'll ask my team to re-validate this with latest NVDA. If it no longer repros, we should disable that check. cc @daxian-dbw

@LeonarddeR
Copy link

I can neither reproduce this behavior with UIA in Windows console enabled or disabled in NVDA. I can still reproduce it in Narrator, though

@SteveL-MSFT
Copy link
Member Author

SteveL-MSFT commented Sep 2, 2020

Narrator doesn't set the SR flag, so PowerShell doesn't know if it's active. When we get around to this feature, we'll need to talk to that team again.

@SteveL-MSFT SteveL-MSFT added this to the Future milestone Sep 3, 2020
@StevenBucher98 StevenBucher98 added the Area-Accessibility Label for issues related to accessibility problems or improvements label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Label for issues related to accessibility problems or improvements
Projects
None yet
Development

No branches or pull requests

6 participants