OLD | NEW |
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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 if (localStorage['useVerboseMode'] == 'false') | 1249 if (localStorage['useVerboseMode'] == 'false') |
1250 return; | 1250 return; |
1251 | 1251 |
1252 if (this.formatOptions_.auralStyle) { | 1252 if (this.formatOptions_.auralStyle) { |
1253 speechProps = new Output.SpeechProperties(); | 1253 speechProps = new Output.SpeechProperties(); |
1254 speechProps['relativePitch'] = -0.3; | 1254 speechProps['relativePitch'] = -0.3; |
1255 } | 1255 } |
1256 options.annotation.push(token); | 1256 options.annotation.push(token); |
1257 var msg = node.role; | 1257 var msg = node.role; |
1258 var info = Output.ROLE_INFO_[node.role]; | 1258 var info = Output.ROLE_INFO_[node.role]; |
1259 if (info) { | 1259 if (node.roleDescription) { |
| 1260 msg = node.roleDescription; |
| 1261 } else if (info) { |
1260 if (this.formatOptions_.braille) | 1262 if (this.formatOptions_.braille) |
1261 msg = Msgs.getMsg(info.msgId + '_brl'); | 1263 msg = Msgs.getMsg(info.msgId + '_brl'); |
1262 else | 1264 else |
1263 msg = Msgs.getMsg(info.msgId); | 1265 msg = Msgs.getMsg(info.msgId); |
1264 } else { | 1266 } else { |
1265 console.error('Missing role info for ' + node.role); | 1267 console.error('Missing role info for ' + node.role); |
1266 } | 1268 } |
1267 this.append_(buff, msg || '', options); | 1269 this.append_(buff, msg || '', options); |
1268 } else if (token == 'inputType') { | 1270 } else if (token == 'inputType') { |
1269 if (!node.inputType) | 1271 if (!node.inputType) |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 /** | 1910 /** |
1909 * Gets the output buffer for braille. | 1911 * Gets the output buffer for braille. |
1910 * @return {!Spannable} | 1912 * @return {!Spannable} |
1911 */ | 1913 */ |
1912 get brailleOutputForTest() { | 1914 get brailleOutputForTest() { |
1913 return this.mergeBraille_(this.brailleBuffer_); | 1915 return this.mergeBraille_(this.brailleBuffer_); |
1914 } | 1916 } |
1915 }; | 1917 }; |
1916 | 1918 |
1917 }); // goog.scope | 1919 }); // goog.scope |
OLD | NEW |