[Webkit-unassigned] [Bug 270616] New: AX: VoiceOver doesn't read as user arrows in Monaco code editor
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 6 20:35:04 PST 2024
https://bugs.webkit.org/show_bug.cgi?id=270616
Bug ID: 270616
Summary: AX: VoiceOver doesn't read as user arrows in Monaco
code editor
Product: WebKit
Version: Safari Technology Preview
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: Accessibility
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dm_mazzoni at apple.com
CC: andresg_22 at apple.com,
webkit-bug-importer at group.apple.com
Created attachment 470221
--> https://bugs.webkit.org/attachment.cgi?id=470221&action=review
Simple repro
rdar://123984168
The Monaco code editor, used as the engine for VS Code, implements a custom text editor. Overall they've gone to great lengths to make it accessible, but the editing feedback when arrowing through character-by-character is broken with the combination of Safari and VoiceOver.
You can try their demo playground here:
https://microsoft.github.io/monaco-editor/playground.html
The underlying issue is that when you press an arrow key, their JavaScript code is intercepting it and moving the cursor programmatically. This results in WebKit generating an editing intent with a text selection direction of AXTextSelectionDirectionDiscontiguous with no granularity, when normally if you pressed right-arrow it would get a direction of AXTextSelectionDirectionNext with a character granularity.
Chrome doesn't have this bug because it tries to infer the text intent in simple cases like when the cursor moves by a single character. I think we should do the same in WebKit. If we're concerned about doing it in general we can limit it to scenarios that we think are more likely to be this sort of custom accessible editor.
I attached a very simple repro that demonstrates the issue without needing to debug all of Monaco. It's just a textarea with JavaScript that intercepts all key presses and manually sets the selection.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240307/2d030870/attachment.htm>
More information about the webkit-unassigned
mailing list