-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Accessibility: setting caret position via IAccessible2 doesn't work #210842
Comments
@mltony thanks for filling this issue. Does this also surface in some user interaction when using nvda with VS Code? |
Currently no, but I am reworking word navigation in NVDA (via |
Thanks. |
My best recollection is it was working back in 2020 - that's when I was playing with word navigation last time. I don't remember what VS Code version was that. |
I am not aware of any changes that could have caused this on our side. Since it cannot be reproduced in VS Code with NVDA, I am thinking it's an issue with IAccessible2, which we cannot investigate. cc @rperez030 for any thoughts |
It can be reproduced - see steps to reproduce in my original description.
Yes, I stated in the description that this is an issue of IAccessible implementation in VSCode. Similar behavior works fine in Chrome.
Why? Chromium doesn't have this problem. Who should investigate this then? |
Using word navigation in VS Code is very necessary and will greatly improve the efficiency of screen reader users in reading code. |
@deepak1556 any idea what could have changed here for us since 2020? |
Word navigation has never worked reliably as far as I'm aware due to underlying bugs in Chrome. |
After further investigation it seems like this might be related to this Chromium issue. But on the other hand, that chromium issue can be easily mitigated by calling |
Thanks for investigating. I am not sure how I can help here. I've added our chromium experts, @deepak1556 and @rzhao271, to this issue, in case they have thoughts. |
Sorry for the delay here, the difference between Chromium and VS Code could be attributed to us disabling the occlusion tracker Lines 291 to 295 in 26120e5
I am yet to try the repro steps, but based on the linked upstream issue this does seem related to incorrect focus handling. I will try a bisect to see if we are able to narrow down the issue on our end. |
Was able to repro with using |
Thank you very much for back-porting the fix @deepak1556 |
Type: Bug
Hello, this is an accessibility regression. cc: @isidorn
Steps to reproduce:
NVDA+Control+z
to open NVDA python console.f()
that retrieves cursor state, then moves it by 10 characters right.alt-tab
to VSCode window (you need to do it within 2 seconds of pressing Enter).Expected result
Cursor should be moved to position 10 in the file.
Actual result
VSCode is left in a very weird state:
RightArrow
LeftArrow
in VSCode, then it reads 1st and 0th characters, so it behaves as if cursor didn't move at all.tt = f.makeTextInfo('caret')
statement in my snippet above) then it reports correct cursor location (otherwise exception would have been raised.So TLDR: VSCode cursor ends up in an inconsistent state, but from the point of view of keyboard commands
LeftArrow
andRightArrow
cursor position doesn't move at all.Technical information
NVDA uses IAccessible2 to talk to VSCode. Cursor position is updated via setCaretOffset method:
https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_text.html#ae0943c1f912e4f35704fe4a0ee98e862
Thanks!
VS Code version: Code 1.88.1 (e170252, 2024-04-10T17:41:02.734Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Extensions (17)
(1 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: