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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 abstractContainer: { | 356 abstractContainer: { |
357 enter: '$name $role', | 357 enter: '$name $role', |
358 leave: '@exited_container($role)' | 358 leave: '@exited_container($role)' |
359 }, | 359 }, |
360 alert: { | 360 alert: { |
361 speak: '!doNotInterrupt $role $descendants' | 361 speak: '!doNotInterrupt $role $descendants' |
362 }, | 362 }, |
363 alertDialog: { | 363 alertDialog: { |
364 enter: '$name $role $descendants' | 364 enter: '$name $role $descendants' |
365 }, | 365 }, |
| 366 cell: { |
| 367 enter: '@column_granularity $tableCellColumnIndex' |
| 368 }, |
366 checkBox: { | 369 checkBox: { |
367 speak: '$name $role $checked' | 370 speak: '$name $role $checked' |
368 }, | 371 }, |
369 dialog: { | 372 dialog: { |
370 enter: '$name $role' | 373 enter: '$name $role' |
371 }, | 374 }, |
372 grid: { | 375 grid: { |
373 enter: '$name $role' | 376 enter: '$name $role' |
374 }, | 377 }, |
375 heading: { | 378 heading: { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 speak: '$value $name $role @aria_has_popup ' + | 418 speak: '$value $name $role @aria_has_popup ' + |
416 '$if($collapsed, @aria_expanded_false, @aria_expanded_true)' | 419 '$if($collapsed, @aria_expanded_false, @aria_expanded_true)' |
417 }, | 420 }, |
418 radioButton: { | 421 radioButton: { |
419 speak: '$if($checked, @describe_radio_selected($name), ' + | 422 speak: '$if($checked, @describe_radio_selected($name), ' + |
420 '@describe_radio_unselected($name))' | 423 '@describe_radio_unselected($name))' |
421 }, | 424 }, |
422 radioGroup: { | 425 radioGroup: { |
423 enter: '$name $role' | 426 enter: '$name $role' |
424 }, | 427 }, |
| 428 row: { |
| 429 enter: '@row_granularity $tableRowIndex' |
| 430 }, |
425 slider: { | 431 slider: { |
426 speak: '@describe_slider($value, $name) $help' | 432 speak: '@describe_slider($value, $name) $help' |
427 }, | 433 }, |
428 staticText: { | 434 staticText: { |
429 speak: '$value $name' | 435 speak: '$value $name' |
430 }, | 436 }, |
431 tab: { | 437 tab: { |
432 speak: '@describe_tab($name)' | 438 speak: '@describe_tab($name)' |
433 }, | 439 }, |
434 textField: { | 440 textField: { |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 var info = Output.ROLE_INFO_[node.role]; | 844 var info = Output.ROLE_INFO_[node.role]; |
839 if (info) { | 845 if (info) { |
840 if (this.formatOptions_.braille) | 846 if (this.formatOptions_.braille) |
841 msg = cvox.ChromeVox.msgs.getMsg(info.msgId + '_brl'); | 847 msg = cvox.ChromeVox.msgs.getMsg(info.msgId + '_brl'); |
842 else | 848 else |
843 msg = cvox.ChromeVox.msgs.getMsg(info.msgId); | 849 msg = cvox.ChromeVox.msgs.getMsg(info.msgId); |
844 } else { | 850 } else { |
845 console.error('Missing role info for ' + node.role); | 851 console.error('Missing role info for ' + node.role); |
846 } | 852 } |
847 this.append_(buff, msg, options); | 853 this.append_(buff, msg, options); |
| 854 } else if (token == 'tableRowIndex' || |
| 855 token == 'tableCellColumnIndex') { |
| 856 var value = node.attributes[token]; |
| 857 if (!value) |
| 858 return; |
| 859 value = String(value + 1); |
| 860 options.annotation.push(token); |
| 861 this.append_(buff, value, options); |
848 } else if (node.attributes[token] !== undefined) { | 862 } else if (node.attributes[token] !== undefined) { |
849 options.annotation.push(token); | 863 options.annotation.push(token); |
850 var value = node.attributes[token]; | 864 var value = node.attributes[token]; |
851 if (typeof value == 'number') | 865 if (typeof value == 'number') |
852 value = String(value); | 866 value = String(value); |
853 this.append_(buff, value, options); | 867 this.append_(buff, value, options); |
854 } else if (Output.STATE_INFO_[token]) { | 868 } else if (Output.STATE_INFO_[token]) { |
855 options.annotation.push('state'); | 869 options.annotation.push('state'); |
856 var stateInfo = Output.STATE_INFO_[token]; | 870 var stateInfo = Output.STATE_INFO_[token]; |
857 var resolvedInfo = {}; | 871 var resolvedInfo = {}; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 } | 1166 } |
1153 | 1167 |
1154 if (currentNode != root) | 1168 if (currentNode != root) |
1155 throw 'Unbalanced parenthesis.'; | 1169 throw 'Unbalanced parenthesis.'; |
1156 | 1170 |
1157 return root; | 1171 return root; |
1158 } | 1172 } |
1159 }; | 1173 }; |
1160 | 1174 |
1161 }); // goog.scope | 1175 }); // goog.scope |
OLD | NEW |