Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2295)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js

Issue 2956663002: Turn on rich editable text by default (Closed)
Patch Set: Rebase again. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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}));
},
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698