• Ajit Narayanan's avatar
    Make select-to-speak ignore nodes with user-select:none. · 1f5e8fea
    Ajit Narayanan authored
    This CL only affects the behavior of Select-to-Speak when STS is
    triggered by selection followed by Search-S (it does not affect STS
    triggered from the tray or by mouse selection). Since keyboard selection
    does not highlight any nodes marked user-select:none, STS follows the
    visual behavior here by ignoring these nodes when spoken out as well.
    While this causes the behavior to be inconsistent between mouse- and
    keyboard-based invocation, it follows the user's mental model: when a
    rectangular selection is made with the mouse, STS speaks out everything
    within the rectangle that the user draws, whereas when a selection is
    made with the cursor and STS invoked from the keyboard, STS speaks out
    whatever was actually selected.
    
    Also added a browser test to verify this behavior.
    
    Bug: 830106
    Change-Id: I8552e7bda40f150df2ab4bb0338de706a717f30e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2426973
    Commit-Queue: Ajit Narayanan <ajitnarayanan@google.com>
    Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#810768}
    1f5e8fea
automation_node.js 55.8 KB