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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 }, | 254 }, |
255 popUpButton: { | 255 popUpButton: { |
256 msgId: 'role_button', | 256 msgId: 'role_button', |
257 }, | 257 }, |
258 radioButton: { | 258 radioButton: { |
259 msgId: 'role_radio' | 259 msgId: 'role_radio' |
260 }, | 260 }, |
261 radioGroup: { | 261 radioGroup: { |
262 msgId: 'role_radiogroup', | 262 msgId: 'role_radiogroup', |
263 }, | 263 }, |
264 region: { | |
265 msgId: 'role_region', | |
266 inherits: 'abstractContainer' | |
267 }, | |
268 rowHeader: { | 264 rowHeader: { |
269 msgId: 'role_rowheader', | 265 msgId: 'role_rowheader', |
270 inherits: 'abstractContainer' | 266 inherits: 'abstractContainer' |
271 }, | 267 }, |
272 scrollBar: { | 268 scrollBar: { |
273 msgId: 'role_scrollbar', | 269 msgId: 'role_scrollbar', |
274 }, | 270 }, |
275 search: { | 271 search: { |
276 msgId: 'role_search', | 272 msgId: 'role_search', |
277 inherits: 'abstractContainer' | 273 inherits: 'abstractContainer' |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 speak: '$if($checked, @describe_radio_selected($name), ' + | 466 speak: '$if($checked, @describe_radio_selected($name), ' + |
471 '@describe_radio_unselected($name)) $description' | 467 '@describe_radio_unselected($name)) $description' |
472 }, | 468 }, |
473 radioGroup: { | 469 radioGroup: { |
474 enter: '$name $role $description' | 470 enter: '$name $role $description' |
475 }, | 471 }, |
476 rootWebArea: { | 472 rootWebArea: { |
477 enter: '$name', | 473 enter: '$name', |
478 speak: '$if($name, $name, $docUrl)' | 474 speak: '$if($name, $name, $docUrl)' |
479 }, | 475 }, |
| 476 region: { |
| 477 speak: '$descendants' |
| 478 }, |
480 row: { | 479 row: { |
481 enter: '@row_granularity $tableRowIndex' | 480 enter: '@row_granularity $tableRowIndex' |
482 }, | 481 }, |
483 slider: { | 482 slider: { |
484 speak: '$earcon(SLIDER) @describe_slider($value, $name) $description' | 483 speak: '$earcon(SLIDER) @describe_slider($value, $name) $description' |
485 }, | 484 }, |
486 staticText: { | 485 staticText: { |
487 speak: '$name=' | 486 speak: '$name=' |
488 }, | 487 }, |
489 tab: { | 488 tab: { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 }.bind(this); | 813 }.bind(this); |
815 return this; | 814 return this; |
816 }, | 815 }, |
817 | 816 |
818 /** | 817 /** |
819 * Executes all specified output. | 818 * Executes all specified output. |
820 */ | 819 */ |
821 go: function() { | 820 go: function() { |
822 // Speech. | 821 // Speech. |
823 var queueMode = this.queueMode_; | 822 var queueMode = this.queueMode_; |
824 if (Output.flushNextSpeechUtterance_ && this.speechBuffer_.length > 0) { | 823 if (Output.flushNextSpeechUtterance_) { |
825 queueMode = cvox.QueueMode.FLUSH; | 824 queueMode = cvox.QueueMode.FLUSH; |
826 Output.flushNextSpeechUtterance_ = false; | 825 Output.flushNextSpeechUtterance_ = false; |
827 } | 826 } |
828 | 827 |
829 this.speechBuffer_.forEach(function(buff, i, a) { | 828 this.speechBuffer_.forEach(function(buff, i, a) { |
830 var speechProps = {}; | 829 var speechProps = {}; |
831 (function() { | 830 (function() { |
832 var scopedBuff = buff; | 831 var scopedBuff = buff; |
833 speechProps = | 832 speechProps = |
834 scopedBuff.getSpanInstanceOf(Output.SpeechProperties) || {}; | 833 scopedBuff.getSpanInstanceOf(Output.SpeechProperties) || {}; |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 elem.end); | 1508 elem.end); |
1510 }); | 1509 }); |
1511 spansToRemove.forEach(result.removeSpan.bind(result)); | 1510 spansToRemove.forEach(result.removeSpan.bind(result)); |
1512 separator = Output.SPACE; | 1511 separator = Output.SPACE; |
1513 }); | 1512 }); |
1514 return result; | 1513 return result; |
1515 } | 1514 } |
1516 }; | 1515 }; |
1517 | 1516 |
1518 }); // goog.scope | 1517 }); // goog.scope |
OLD | NEW |