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

Unable to use applications that hook the arrow keys using Windows Console Host. #13666

Open
TheQuinbox opened this issue Aug 3, 2022 · 9 comments
Assignees
Labels
Area-Accessibility Issues related to accessibility Disability-LowVision Accessibility tracking InclusionBacklog Accessibility tracking InclusionBacklog-Windows TerminalWin32 Accessibility tracking Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@TheQuinbox
Copy link

Windows Terminal version

1.14.1962.0

Windows build number

Windows 10 21H2 (64-bit) build 19044.1826

Other Software

GitHub CLI latest version.

Steps to reproduce

  1. Run a GH (or other application that hooks the arrow keys) command
  2. Attempt to arrow.

Expected Behavior

This should behave exactly as it does in cmd. I'm able to arrow through the options accessibly and select an option.

Actual Behavior

When using both Narrator and NVDA, I hear "blank". I'm unable to confirm if this is a visual problem as well.

@TheQuinbox TheQuinbox added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Aug 3, 2022
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 3, 2022
@TheQuinbox
Copy link
Author

I can now confirm that its a screen reader only problem. The cursor moves, but NVDA and Narrator just don't read it

@zadjii-msft
Copy link
Member

@carlos-zamora You know if we've got this one on the backlog? You're usually faster at searching the a11y threads than me ☺️

@carlos-zamora
Copy link
Member

Doesn't sound familiar from the backlog. This sounds pretty sever though.
@TheQuinbox a few questions for you:

  • What shell are you using? It sounds like you're using PowerShell, but can you tell me the version? FYI "PowerShell 7.3.0-preview.6" adds suggested text as you type. I still don't get the "blank" behavior, but idk if that's related?
  • When you say "attempt to arrow", what direction are you going in? up/down to select the previous/next command? Or left, right to move the cursor?
  • What GH command are you executing exactly? I can't find any that hook the arrow keys. Upon execution (at least the ones I use), the command just outputs text that is then read by the screen reader, as expected.

I can't get a repro, so I'm hoping some more details can help. Thanks!

@TheQuinbox
Copy link
Author

Hi @carlos-zamora,
I'm using Command Prompt, but I just tested, and it also happens with PowerShell.
I'm using the up and down arrow keys to move between options. If using NVDA's review cursor, I can tell what option is selected, but it takes significantly more time.
I'm running:

$ gh pr create

when on a branch with uncommitted changes. I'm then brought to a wizard that asks me to select an option.

Its probably worth mentioning that I've also tested this in standalone CMD.exe and PowerShell.exe shells and it doesn't happen.

If still unable to reproduce, would an audio demonstration possibly help?

Thanks so much for looking into this! :)

@carlos-zamora
Copy link
Member

Awesome. Got it! Thanks!

For visual users, this is what the UI looks like:
image of command output

In this case, the text reads:

D:\Projects\terminal>gh pr create
? Where should we push the 'dev/cazamor/test' branch?  [Use arrows to move, type to filter]
  microsoft/terminal
> Create a fork of microsoft/terminal
  Skip pushing the branch
  Cancel

The key thing to see here is the ">". Pressing up and down "moves" that symbol.

Here's the tricky party though, when up/down is pressed, the screen reader reads the entire output again, suggesting that gh.exe is actually deleting and re-rendering the entire output again with the ">" in the correct place.

Now, as for a fix, I'm a bit stumped. I'll throw the "Needs-Discussion" tag so that we discuss this at an upcoming sync. Fair warning, I'm about to head out on vacation for a bit, so it'll probably be a while before I get back to you on this one. Maybe 2 weeks? Don't worry though, as long as that "Needs-Discussion" tag is on the issue, we'll get to it (we go over as many as we can when we meet up at our weekly sync meeting)

@carlos-zamora carlos-zamora added Area-Accessibility Issues related to accessibility Product-Terminal The new Windows Terminal. Needs-Discussion Something that requires a team discussion before we can proceed and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 4, 2022
@TheQuinbox
Copy link
Author

Awesome, sounds great! I have honestly no idea how Terminal renders, but I do remember hearing that it uses the GPU. Maybe that's playing a part? As stated previously this doesn't happen anywhere else.

Thanks for looking into this! :)

@zadjii-msft zadjii-msft removed the Needs-Discussion Something that requires a team discussion before we can proceed label Aug 29, 2022
@TheQuinbox
Copy link
Author

Hi,
have there been any updates on this issue? Am still fully able to reproduce on Windows 11 22h2 (build 22000.198), with Windows Terminal 1.15.2875.0.
Thanks!

@carlos-zamora
Copy link
Member

Hi @TheQuinbox. Sorry I didn't get back to you! Yeah, so like I said in my comment above, I don't think there's a quick-n-easy fix for this. gh.exe is rewriting the entire prompt every time, resulting in the screen readers thinking either (1) the entire prompt is "new content" that needs to be reread, or (2) nothing changed because the new content is largely similar to the old content.

You could file a bug on NVDA/Narrator to have better handling for this kind of scenario. That might be the quickest way forward to see change here.

Outside of that, the best idea I've come up with is to develop a system for which command line applications can explicitly tell screen readers what to read out. However, this involves changes on our end and on the app's end (in this case, gh.exe), and that'll take months to get done.

Regardless, I'm sorry to say that implementing a solution here is going to take a long time. I'll keep this thread in the loop as new updates develop.

@zadjii-msft zadjii-msft added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. labels Oct 26, 2022
@zadjii-msft
Copy link
Member

zadjii-msft commented Oct 26, 2022

x-linking:

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 Disability-LowVision Accessibility tracking InclusionBacklog Accessibility tracking InclusionBacklog-Windows TerminalWin32 Accessibility tracking Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants