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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js

Issue 2917123002: Support role description in automation/ChromeVox (Closed)
Patch Set: Changes to c/c/e/a/PRESUBMIT.py 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Provides output services for ChromeVox. 6 * @fileoverview Provides output services for ChromeVox.
7 */ 7 */
8 8
9 goog.provide('Output'); 9 goog.provide('Output');
10 goog.provide('Output.EventType'); 10 goog.provide('Output.EventType');
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 if (localStorage['useVerboseMode'] == 'false') 1236 if (localStorage['useVerboseMode'] == 'false')
1237 return; 1237 return;
1238 1238
1239 if (this.formatOptions_.auralStyle) { 1239 if (this.formatOptions_.auralStyle) {
1240 speechProps = new Output.SpeechProperties(); 1240 speechProps = new Output.SpeechProperties();
1241 speechProps['relativePitch'] = -0.3; 1241 speechProps['relativePitch'] = -0.3;
1242 } 1242 }
1243 options.annotation.push(token); 1243 options.annotation.push(token);
1244 var msg = node.role; 1244 var msg = node.role;
1245 var info = Output.ROLE_INFO_[node.role]; 1245 var info = Output.ROLE_INFO_[node.role];
1246 if (info) { 1246 if (node.roleDescription) {
1247 msg = node.roleDescription;
1248 } else if (info) {
1247 if (this.formatOptions_.braille) 1249 if (this.formatOptions_.braille)
1248 msg = Msgs.getMsg(info.msgId + '_brl'); 1250 msg = Msgs.getMsg(info.msgId + '_brl');
1249 else 1251 else
1250 msg = Msgs.getMsg(info.msgId); 1252 msg = Msgs.getMsg(info.msgId);
1251 } else { 1253 } else {
1252 console.error('Missing role info for ' + node.role); 1254 console.error('Missing role info for ' + node.role);
1253 } 1255 }
1254 this.append_(buff, msg || '', options); 1256 this.append_(buff, msg || '', options);
1255 } else if (token == 'inputType') { 1257 } else if (token == 'inputType') {
1256 if (!node.inputType) 1258 if (!node.inputType)
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 /** 1897 /**
1896 * Gets the output buffer for braille. 1898 * Gets the output buffer for braille.
1897 * @return {!Spannable} 1899 * @return {!Spannable}
1898 */ 1900 */
1899 get brailleOutputForTest() { 1901 get brailleOutputForTest() {
1900 return this.mergeBraille_(this.brailleBuffer_); 1902 return this.mergeBraille_(this.brailleBuffer_);
1901 } 1903 }
1902 }; 1904 };
1903 1905
1904 }); // goog.scope 1906 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698