Support mode to not redraw line for screen reader purposes · Issue #859 · PowerShell/PSReadLine · GitHub
Skip to content

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

Open

Description

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.

Activity

  1. lzybkr commented on Feb 20, 2019

    @lzybkr
    Contributor

    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.

  2. SteveL-MSFT commented on Feb 20, 2019

    @SteveL-MSFT
    MemberAuthor

    Disabling coloring completely in this mode seems fine.

  3. lzybkr commented on Feb 20, 2019

    @lzybkr
    Contributor

    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.

  4. lzybkr commented on Feb 20, 2019

    @lzybkr
    Contributor

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

  5. SteveL-MSFT commented on Feb 20, 2019

    @SteveL-MSFT
    MemberAuthor

    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.

  6. lzybkr commented on Feb 20, 2019

    @lzybkr
    Contributor

    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.

  7. SteveL-MSFT commented on Feb 20, 2019

    @SteveL-MSFT
    MemberAuthor

    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.

  8. josephsl commented on Sep 2, 2020

    @josephsl

    Hello everyone,

    I'm a Narrator user and an NVDA developer. Based on a discussion with @Steve Lee (@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 Leonard de Ruijter (@LeonarddeR), Bill Dengler (@codeofdusk)

  9. SteveL-MSFT commented on Sep 2, 2020

    @SteveL-MSFT
    MemberAuthor

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

  10. LeonarddeR commented on Sep 2, 2020

    @LeonarddeR

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

  11. SteveL-MSFT commented on Sep 2, 2020

    @SteveL-MSFT
    MemberAuthor

    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.

  12. added this to the Future milestone on Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-AccessibilityLabel for issues related to accessibility problems or improvements

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions