Explainer for visual order caret movement in bidi text#1304
Explainer for visual order caret movement in bidi text#1304sambandaru wants to merge 3 commits intoMicrosoftEdge:mainfrom
Conversation
89a95d4 to
a24431d
Compare
| - Web developers building multilingual editing experiences | ||
| - Accessibility users who rely on consistent and predictable caret behavior | ||
|
|
||
| User research with Arabic–English bilingual users confirms that almost all participants expect visual caret movement — Left always moves left, Right always moves right — regardless of script direction. |
There was a problem hiding this comment.
Again, is there anything more specific we can share about what user research was done?
There was a problem hiding this comment.
Same as comment above. https://microsoftapc-my.sharepoint.com/:w:/g/personal/prashasingh_microsoft_com/IQBmQdITYWCYRqBUtV0ygufVAc_2_w2NVqNE5-fvB3pxIxg?e=IbVn8L. This is an internal study
Updated references
| 2. **WHATWG Selection API -- `Selection.modify()`:** https://w3c.github.io/selection-api/#dom-selection-modify | ||
| 3. **Firefox `bidi.edit.caret_movement_style` preference:** https://kb.mozillazine.org/bidi.edit.caret_movement_style | ||
| 4. **macOS TextKit 2 — NSTextSelectionNavigation:** https://developer.apple.com/documentation/uikit/nstextselectionnavigation/direction | ||
| 5. **Chromium M76 visual navigation removal:** https://crbug.com/972750, https://crbug.com/834765 |
There was a problem hiding this comment.
I don't have access to the first of these bugs, and the second one is an Extensions bug that seems unrelated (wrong link?). Is there more you can say about why this was removed in the past?
There was a problem hiding this comment.
I have referenced the correct PSA now.
Apparently, it was because the behavior was too difficult to maintain with LayoutNG.
There was a problem hiding this comment.
This is pretty important context that should maybe be inlined into the document. Have you talked with Xiaocheng about this? LayoutNG has now been fully adopted as Chromium's layout engine, so that constraint has not gone away.
b2612f4 to
172ea28
Compare
172ea28 to
cd4d6eb
Compare
| 3. **Firefox `bidi.edit.caret_movement_style` preference:** https://kb.mozillazine.org/bidi.edit.caret_movement_style | ||
| 4. **macOS TextKit 2 — NSTextSelectionNavigation:** https://developer.apple.com/documentation/uikit/nstextselectionnavigation/direction | ||
| 5. **Chromium M76 switch to logical caret movement:** [PSA: Changing Left/Right Caret Movement from Visual to Logical](https://groups.google.com/a/chromium.org/g/blink-dev/c/Rm1CGy6RBAI/m/uYN8IiZlCgAJ) | ||
| 6. [[Research findings] Bidirectional text editing](https://microsoftapc-my.sharepoint.com/:w:/g/personal/prashasingh_microsoft_com/IQBmQdITYWCYRqBUtV0ygufVAc_2_w2NVqNE5-fvB3pxIxg?e=wcaccI) |
There was a problem hiding this comment.
This link isn't available to Microsoft-external readers. If it's something we can share publicly, let's move it to something like a Google Doc where it can be universally readable. If we can't share it publicly, it shouldn't be included here.
Chromium currently uses logical (DOM-order) caret movement, which causes the caret to jump unpredictably at bidi boundaries. This explainer proposes switching to visual caret movement - Left always moves left, Right always moves right. The feature will be gated behind the BidiVisualOrderCaretMovement feature flag.
This aligns Chromium with Firefox and Safari, which already default to visual caret movement.