New issue
Advanced search Search tips

Issue 800912 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug
STS
Team-Accessibility



Sign in to add a comment

[Select-to-speak] Sometimes speech cuts off early because node names and locations become undefined

Project Member Reported by katie@chromium.org, Jan 10 2018

Issue description

All the nodes at a certain point seem to become invalid / all their properties are undefined. Some options:
* Keep track of the initial selection state and node reached. After a refresh/invalid event, re-process what remains and keep going.
* After completing speech on a NodeGroup, generate the next NodeGroup immediately and then speak it. Instead of finding all the nodes the very beginning

For starters:
* See why it's all getting invalidated (is there a TreeChange?)
 

Comment 1 by katie@chromium.org, Jan 18 2018

Cc: dmazz...@chromium.org
Summary: [Select-to-speak] Sometimes speech cuts off early because node names and locations become undefined (was: [Select-to-speak] When reading a long page, like all of the Reddit front page, it stops too early)
Another example that seems like the same bug on a much smaller page:

chrome://extensions
Load unpacked extension (in my case, a Chrome OS built-in tts extension)
Read the title or description of this extension and it breaks.

Try reading one word in the extension with search+s and it doesn't highlight.
Try reading one word in any other extension and highlight works fine.

Is this because the item is inserted after the page was created?

Comment 2 by katie@chromium.org, Jan 19 2018

Turns out: Inline text boxes are not super stable. The parent staticText sticks around, so we should keep track of the parent staticText nodes instead of the inlineText children.

Comment 3 by katie@chromium.org, Jan 19 2018

Owner: katie@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88d3877f67f544c70e5c98fca6468be99cf91968

commit 88d3877f67f544c70e5c98fca6468be99cf91968
Author: Katie D <katie@chromium.org>
Date: Mon Jan 29 22:19:59 2018

Don't save references to inlineTextBox.

InlineTextBoxes are not as stable as their staticText parents.
Select to Speak will now keep track of staticText instead of
inlineTextBoxes during speech.

Also adds some null/undefined checks and a new test, which
should improve robustness.

This still does not work on sites that update live, like
nytimes interactive articles which refresh every second or so.
However, it does fix behavior in cases like the examples listed
in the bug.

Bug:  800912 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ica886e954905cfb69b9b6a533965d6490c2fae0c
Reviewed-on: https://chromium-review.googlesource.com/879405
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532619}
[modify] https://crrev.com/88d3877f67f544c70e5c98fca6468be99cf91968/chrome/browser/resources/chromeos/select_to_speak/paragraph_utils.js
[modify] https://crrev.com/88d3877f67f544c70e5c98fca6468be99cf91968/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js
[modify] https://crrev.com/88d3877f67f544c70e5c98fca6468be99cf91968/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_keystroke_selection_test.extjs

Comment 5 by katie@chromium.org, Jan 29 2018

Status: Fixed (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f9dac25a175846cf0cab82b4d0231e8b7da98bc

commit 8f9dac25a175846cf0cab82b4d0231e8b7da98bc
Author: Katie D <katie@chromium.org>
Date: Fri Feb 02 23:34:18 2018

Removes any dependency on inlineTextBoxes state.

Previously, we tracked inlineTextBox nodes using their index in the
staticText parent. However, if the container holding the text was
resized, the staticText parent indices change as the flow of boxes
within them changes. This change removes all dependency on the
index of the inlineTextBox within the staticText node, and instead
relies purely on character indices to determine nodes to highlight.

Bug:  800912 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I0c0ecb2f78912b376040cc029f77a32fec6f5c85
Reviewed-on: https://chromium-review.googlesource.com/898206
Commit-Queue: Katie Dektar <katie@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534194}
[modify] https://crrev.com/8f9dac25a175846cf0cab82b4d0231e8b7da98bc/chrome/browser/chromeos/accessibility/select_to_speak_browsertest.cc
[modify] https://crrev.com/8f9dac25a175846cf0cab82b4d0231e8b7da98bc/chrome/browser/resources/chromeos/select_to_speak/paragraph_utils.js
[modify] https://crrev.com/8f9dac25a175846cf0cab82b4d0231e8b7da98bc/chrome/browser/resources/chromeos/select_to_speak/paragraph_utils_unittest.gtestjs
[modify] https://crrev.com/8f9dac25a175846cf0cab82b4d0231e8b7da98bc/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js
[modify] https://crrev.com/8f9dac25a175846cf0cab82b4d0231e8b7da98bc/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_keystroke_selection_test.extjs
[modify] https://crrev.com/8f9dac25a175846cf0cab82b4d0231e8b7da98bc/chrome/browser/resources/chromeos/select_to_speak/select_to_speak_unittest.gtestjs

Components: UI>Accessibility>SelectToSpeak
Moving from just having STS label to also having the UI>Accessibility>SelectToSpeak component to make searching easier in the future. 

Sign in to add a comment