Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js |
| index a679a41658593bf09f3116bb4c41ca6c0d9dbfde..e6f234cd0f05182c43750238295ea3f60a942d0e 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js |
| @@ -45,7 +45,7 @@ editing.TextEditHandler = function(node) { |
| * Flag set to indicate whether ChromeVox uses experimental rich text support. |
| * @type {boolean} |
| */ |
| -editing.useRichText = false; |
| +editing.useRichText = true; |
| editing.TextEditHandler.prototype = { |
| /** @return {!AutomationNode} */ |
| @@ -385,6 +385,21 @@ AutomationRichEditableText.prototype = { |
| value.setSpan(new cvox.ValueSpan(0), 0, cur.value_.length); |
| value.setSpan( |
| new cvox.ValueSelectionSpan(), cur.startOffset, cur.endOffset); |
| + |
| + // We might have to append labels for this text field if |cur| is the first |
| + // line. |
| + if (cur.localLineStartContainerOffset_ == 0 && |
| + cur.lineStartContainer_ == |
| + this.node_.find({role: RoleType.STATIC_TEXT})) { |
|
dmazzoni
2017/06/23 18:36:01
I think this assumes that the first static text is
David Tseng
2017/06/23 18:44:28
To be internally consistent with EditableLine, we
|
| + value = new Spannable(value); |
| + var labelComponents = [' ']; |
| + if (this.node_.name) |
| + labelComponents.push(this.node_.name); |
| + labelComponents.push(Msgs.getMsg('tag_textarea_brl')); |
| + var label = labelComponents.join(' '); |
| + value.append(label); |
| + } |
| + |
| cvox.ChromeVox.braille.write(new cvox.NavBraille( |
| {text: value, startIndex: cur.startOffset, endIndex: cur.endOffset})); |
| }, |