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

NVDA no longer gains focus properly when opening VS Code #152291

Closed
Neurrone opened this issue Jun 16, 2022 · 38 comments · Fixed by #154795
Closed

NVDA no longer gains focus properly when opening VS Code #152291

Neurrone opened this issue Jun 16, 2022 · 38 comments · Fixed by #154795
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release confirmed Issue has been confirmed by VS Code Team member electron-18-update insiders-released Patch has been released in VS Code Insiders verified Verification succeeded windows VS Code on Windows issues

Comments

@Neurrone
Copy link

Issue Type: Bug

/CC @isidorn

NVDA is completely unable to focus on the control with keyboard focus in VS code when alt tabbing into it from another application. This happens 100% of the time for me.

This is very similar to #28316. When this occurs, Vs Code is completely unusable with NVDA (pressing tab and arrow keys doesn't read anything.

I am completely unable to use Vs Code. Only started happening today when I got a new insiders build. Since I haven't updated NVDA for a couple of months, a recent change in Code is a likely suspect.

VS Code version: Code - Insiders 1.69.0-insider (0b74e15, 2022-06-15T05:16:09.187Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Remote OS version: Linux x64 5.10.102.1-microsoft-standard-WSL2

System Info
Item Value
CPUs AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 x 1697)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.23GB (15.97GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu/home/dickson/source/backend-api --remote=wsl+Ubuntu --crash-reporter-id 1304d64e-abdb-456c-beb6-72c33120f731
Screen Reader yes
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.102.1-microsoft-standard-WSL2
CPUs AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 x 1696)
Memory (System) 24.44GB (18.99GB free)
VM 0%
Extensions (26)
Extension Author (truncated) Version
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.240.0
remote-ssh ms- 0.82.1
remote-ssh-edit ms- 0.80.0
remote-wsl ms- 0.66.3
vscode-remote-extensionpack ms- 0.21.0
vscode-eslint dba 2.2.2
dendron den 0.99.0
dendron-markdown-links den 0.6.20
dendron-markdown-preview-enhanced den 0.10.57
dendron-markdown-shortcuts den 0.12.1
dendron-paste-image den 1.1.0
dendron-snippet-maker den 0.1.6
gitlens eam 12.1.0
prettier-vscode esb 9.5.0
copilot Git 1.29.6152
rest-client hum 0.24.6
rainbow-csv mec 2.4.0
python ms- 2022.8.0
vscode-pylance ms- 2022.6.20
jupyter ms- 2022.5.1001601848
vsliveshare ms- 1.0.5625
vsliveshare-audio ms- 0.1.91
vsliveshare-pack ms- 0.4.0
vscode-mermaid-editor tom 0.14.0
vscode-remark uni 1.3.0
@Neurrone
Copy link
Author

Neurrone commented Jun 16, 2022

Switching to stable (v1.68.1) allows me to continue working, so this must have been a very recent regression.

@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2022

@Neurrone thanks for reporting this.

This sounds like it is connected to the Electron 17->18 update.
@deepak1556 can you please check if there is something related to this in the update? The previous issue might have useful details #28316

I know @Neurrone can tryout some builds to help trim down the issue.

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues electron-18-update labels Jun 17, 2022
@isidorn isidorn added this to the June 2022 milestone Jun 17, 2022
@Neurrone
Copy link
Author

Any chance the Electron upgrade could be reverted before the July 2022 release? It would be a massive issue for screen reader users if it makes it to stable.

@Neurrone Neurrone reopened this Jun 26, 2022
@deepak1556
Copy link
Contributor

@Neurrone does the issue repro when you launch insiders with the following flag code-insiders --disable-features=CalculateNativeWinOcclusion

@Neurrone
Copy link
Author

@deepak1556 thanks, that fixed it. Sounds like an upstream bug with Chrome or Electron?

@isidorn
Copy link
Contributor

isidorn commented Jun 27, 2022

I just tried to reproduce this and could not on my Windows VM with NVDA.
@Neurrone do you have more precise repro steps? Here is what I am doing

  1. Start NVDA
  2. Start VS Code insiders
  3. Alt + Tab into VS Code -> NVDA nicely reads VS Code editor content

Repeat step 3 multiple times -> all is good.
Are you doing something differently?

@deepak1556 deepak1556 added the windows VS Code on Windows issues label Jun 27, 2022
@Neurrone
Copy link
Author

Neurrone commented Jun 28, 2022

@isidorn that's essentially what I did. I've attached a video that demonstrates the problem. Notice that after I alt tab from Vs Code to Firefox, then back into code, I get no feedback at all even though I am moving my cursor.

@Neurrone
Copy link
Author

Not sure why the link doesn't work, let me try re-uploading again.

vs.code.focus.bug.mp4

@jeanbrazcosta
Copy link

Hello everybody.

@isidorn I'm also having the same problem as @Neurrone if I go to any other window and go back to vs code insiders I can't read anything else, to get it working again I have to press alt + space.

@Neurrone
Copy link
Author

Neurrone commented Jul 7, 2022

This affects Jaws as well. I've seen similar reports of this on other mailing lists.

@ProbablyBrian
Copy link

I'm another user using NVDA with VS Code Insiders (Windows 10) and am being affected by this issue as well. It tends to not be instantaneous for me; i have to shift focus to another application for more than a few seconds in order for it to trigger, but it is almost any time. Typically noticed when i alt-tab to a web browser to check documentation. By the time I switch focus back to VS Code Insiders this has occurred.

@Neurrone
Copy link
Author

Neurrone commented Jul 8, 2022

Unfortunately, this appears to have made it into stable. See #154398.

@deepak1556 deepak1556 added the confirmed Issue has been confirmed by VS Code Team member label Jul 8, 2022
@deepak1556 deepak1556 added the candidate Issue identified as probable candidate for fixing in the next release label Jul 8, 2022
@bramd
Copy link

bramd commented Jul 10, 2022

Same issue here. I couldn't find an upstream bug in Electron for this yet. I think it is crucial to get it fixed there before other major apps update their Electron dependency. Unfortunately, I don't know enough technical details to file that bug myself.

@jeanbrazcosta
Copy link

jeanbrazcosta commented Jul 10, 2022 via email

@bkoray
Copy link

bkoray commented Jul 10, 2022

Another +1 here, seems like bug made its way to stable. Currently both stable and latest Insiders as of this comment suffers from the issue. I've tried everything including removing all extensions yet issue still persists.

Generally I need to be in another window for some time for it to occur and only way to recover seems to be restarting the editor.

@mzanm
Copy link

mzanm commented Jul 11, 2022

Another +1 here as well.

@deepak1556
Copy link
Contributor

deepak1556 commented Jul 11, 2022

Update: The issue has been identified and a fix is being worked on currently. I will update here once builds are available for testing. Thanks for your patience!

Addressed in (MS-only link) : https://domoreexp.visualstudio.com/Teamspace/_git/electron-build/pullrequest/556786

@justas2481
Copy link

I have the same problem after update. It is really crytical issue for the blind users, because it makes VSCode impossible to use and we actually rely on VSCode very much, it is the best editor for us. Temporary measure to keep it working is to downgrade or to use command in your CMD "code --disable-features=CalculateNativeWinOcclusion". I hope this will be fixed soon, my job depends on it. P.s. thank you Microsoft team for being responsible and making stuff accessible.
@deepak1556

@LeonarddeR
Copy link

Wouldn't it be possible to disable CalculateNativeWinOcclusion when screen reader mode is on and add that to a patch release?

@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Jul 11, 2022
@deepak1556
Copy link
Contributor

Steps for verification:

  • Install NVDA
  • Open insiders
  • Ensure editor is screen reader optimized by toggling Show: Accessibility Help (Alt + F1) and Ctrl + E
  • Verify NVDA is able to read editor contents
  • Press Win key + D to go back to desktop
  • From desktop Alt + Tab into Insiders
  • Verify NVDA is able to read editor contents

@snufas
Copy link

snufas commented Jul 11, 2022

@isidorn
we had same exact issue a while back,, seems it popped up again.

@deepak1556
I assume the fix will be available in 1 of the nightly builds right?
I only use stable releases, but this issue is such important is that I am waiting for nightly build to be implemented with this fix.

The workout for me currently is just type any symbol, it could be a space, and then delete that, and the focus will go back to normal. Of course, it's a bit annoying, but for the time being it works.
Please ship that fix ASAP, because some people are relying on this tool alone to get the job done.

@deepak1556
Copy link
Contributor

Yes the fix will be shipped first in nightly insiders. Once it has been verified, we already have plan for a recovery release 1.69.1 this week and the fix will be included as part of it.

@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jul 11, 2022
@deepak1556 deepak1556 added the author-verification-requested Issues potentially verifiable by issue author label Jul 11, 2022
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest release of VS Code Insiders!

@Neurrone, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 9925e5d of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@LeonarddeR
Copy link

@deepak1556 Slightly offtopic, but:

  • Is it likely that other Microsoft software that's Electron based (e.g. Microsoft Teams) will suffer from this bug as well as benefit from the changes made in the VS specific build of Electron?
  • How about Electron itself? Will changes be provided as a pr to upstream as well, or is this not applicable?

@deepak1556
Copy link
Contributor

Is it likely that other Microsoft software that's Electron based (e.g. Microsoft Teams) will suffer from this bug as well as benefit from the changes made in the VS specific build of Electron?

Yup indeed they also hit this issue once updated to Electron >= 18 and the fix will address the issue for other build flavors as well.

How about Electron itself? Will changes be provided as a pr to upstream as well, or is this not applicable?

Upstream Electron is not affected by the issue. The issue only affects Microsoft builds of Electron due to a certain patch carried internally, I can provide context of the bug if interested but it will dive into chromium internals hence didn't add them here initially.

@Neurrone
Copy link
Author

@deepak1556 I've verified that the fix works for me as expected. Thanks a lot for prioritizing this fix 🙏

I'm also relieved that this isn't an upstream issue, as this would be disastrous given how widespread Electron's use is.

@deepak1556
Copy link
Contributor

Thanks for confirming!

@deepak1556 deepak1556 added verified Verification succeeded and removed author-verification-requested Issues potentially verifiable by issue author labels Jul 11, 2022
@justas2481
Copy link

@deepak1556 I can as well verify that this bug is fixed on Insiders.

@LeonarddeR
Copy link

I can also confirm that it works like a charm again.

@marlon-sousa
Copy link

Hello,

Please provide details of this bug if possible, even if it somehow touches chromium internals.

It would be also nice to know when the release recovery will ship (nsome people might not be authorized to use preview).

Thanks,
Marlon

@jeanbrazcosta
Copy link

jeanbrazcosta commented Jul 11, 2022 via email

@joaomoreno joaomoreno added verified Verification succeeded and removed verified Verification succeeded labels Jul 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release confirmed Issue has been confirmed by VS Code Team member electron-18-update insiders-released Patch has been released in VS Code Insiders verified Verification succeeded windows VS Code on Windows issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.