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

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

Issue 2799443002: Implemented ARIA colindex, rowindex, colcount and rowcount for Chromevox. (Closed)
Patch Set: Added braces. Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/automation.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 }, 420 },
421 alert: { 421 alert: {
422 enter: '$name $role $state', 422 enter: '$name $role $state',
423 speak: '$earcon(ALERT_NONMODAL) $role $nameOrTextContent $state' 423 speak: '$earcon(ALERT_NONMODAL) $role $nameOrTextContent $state'
424 }, 424 },
425 alertDialog: { 425 alertDialog: {
426 enter: '$earcon(ALERT_MODAL) $name $state', 426 enter: '$earcon(ALERT_MODAL) $name $state',
427 speak: '$earcon(ALERT_MODAL) $name $nameOrTextContent $state $role' 427 speak: '$earcon(ALERT_MODAL) $name $nameOrTextContent $state $role'
428 }, 428 },
429 cell: { 429 cell: {
430 enter: '@cell_summary($tableCellRowIndex, $tableCellColumnIndex) ' + 430 enter: '@cell_summary($if($ariaCellRowIndex, $ariaCellRowIndex, ' +
431 '$node(tableColumnHeader)', 431 '$tableCellRowIndex), ' +
432 speak: '@cell_summary($tableCellRowIndex, $tableCellColumnIndex) ' + 432 '$if($ariaCellColumnIndex, $ariaCellColumnIndex, ' +
433 '$node(tableColumnHeader) $state' 433 '$tableCellColumnIndex)) $node(tableColumnHeader)',
434 speak: '@cell_summary($if($ariaCellRowIndex, $ariaCellRowIndex, ' +
435 '$tableCellRowIndex), ' +
436 '$if($ariaCellColumnIndex, $ariaCellColumnIndex, ' +
David Tseng 2017/04/20 23:32:40 Look at the way tableCellRowIndex/tableCellColumnI
437 '$tableCellColumnIndex)) $node(tableColumnHeader) $state'
434 }, 438 },
435 checkBox: { 439 checkBox: {
436 speak: '$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) ' + 440 speak: '$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) ' +
437 '$name $role $checked $description $state' 441 '$name $role $checked $description $state'
438 }, 442 },
439 client: { 443 client: {
440 speak: '$name' 444 speak: '$name'
441 }, 445 },
442 date: { 446 date: {
443 enter: '$nameFromNode $role $description' 447 enter: '$nameFromNode $role $description'
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 switch: { 561 switch: {
558 speak: '$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) ' + 562 speak: '$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) ' +
559 '$if($checked, @describe_switch_on($name), ' + 563 '$if($checked, @describe_switch_on($name), ' +
560 '@describe_switch_off($name)) $description $state' 564 '@describe_switch_off($name)) $description $state'
561 }, 565 },
562 tab: { 566 tab: {
563 speak: '@describe_tab($name) $state $description ' + 567 speak: '@describe_tab($name) $state $description ' +
564 '$if($setSize, @describe_index($posInSet, $setSize))', 568 '$if($setSize, @describe_index($posInSet, $setSize))',
565 }, 569 },
566 table: { 570 table: {
567 enter: '@table_summary($name, $tableRowCount, $tableColumnCount) ' + 571 enter: '@table_summary($name, ' +
572 '$if($ariaRowCount, $ariaRowCount, $tableRowCount), ' +
573 '$if($ariaColumnCount, $ariaColumnCount, $tableColumnCount)) ' +
568 '$node(tableHeader)' 574 '$node(tableHeader)'
569 }, 575 },
570 tableHeaderContainer: { 576 tableHeaderContainer: {
571 speak: '$nameOrTextContent $state $description' 577 speak: '$nameOrTextContent $state $description'
572 }, 578 },
573 textField: { 579 textField: {
574 speak: '$name $value $if($multiline, @tag_textarea, $if(' + 580 speak: '$name $value $if($multiline, @tag_textarea, $if(' +
575 '$inputType, $inputType, $role)) $description $state', 581 '$inputType, $inputType, $role)) $description $state',
576 braille: '' 582 braille: ''
577 }, 583 },
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 this.append_(buff, msg || '', options); 1253 this.append_(buff, msg || '', options);
1248 } else if (token == 'inputType') { 1254 } else if (token == 'inputType') {
1249 if (!node.inputType) 1255 if (!node.inputType)
1250 return; 1256 return;
1251 options.annotation.push(token); 1257 options.annotation.push(token);
1252 var msgId = Output.INPUT_TYPE_MESSAGE_IDS_[node.inputType] || 1258 var msgId = Output.INPUT_TYPE_MESSAGE_IDS_[node.inputType] ||
1253 'input_type_text'; 1259 'input_type_text';
1254 if (this.formatOptions_.braille) 1260 if (this.formatOptions_.braille)
1255 msgId = msgId + '_brl'; 1261 msgId = msgId + '_brl';
1256 this.append_(buff, Msgs.getMsg(msgId), options); 1262 this.append_(buff, Msgs.getMsg(msgId), options);
1257 } else if (token == 'tableCellRowIndex' || 1263 } else if (token == 'tableCellRowIndex' ||
David Tseng 2017/04/20 23:38:58 Add checks for the aria prefixed TableCell*Index a
1258 token == 'tableCellColumnIndex') { 1264 token == 'tableCellColumnIndex') {
1259 var value = node[token]; 1265 var value = node[token];
1260 if (value == undefined) 1266 if (value == undefined)
1261 return; 1267 return;
1262 value = String(value + 1); 1268 value = String(value + 1);
1263 options.annotation.push(token); 1269 options.annotation.push(token);
1264 this.append_(buff, value, options); 1270 this.append_(buff, value, options);
1265 } else if (token == 'node') { 1271 } else if (token == 'node') {
1266 if (!tree.firstChild || !node[tree.firstChild.value]) 1272 if (!tree.firstChild || !node[tree.firstChild.value])
1267 return; 1273 return;
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 /** 1894 /**
1889 * Gets the output buffer for braille. 1895 * Gets the output buffer for braille.
1890 * @return {!Spannable} 1896 * @return {!Spannable}
1891 */ 1897 */
1892 get brailleOutputForTest() { 1898 get brailleOutputForTest() {
1893 return this.mergeBraille_(this.brailleBuffer_); 1899 return this.mergeBraille_(this.brailleBuffer_);
1894 } 1900 }
1895 }; 1901 };
1896 1902
1897 }); // goog.scope 1903 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/automation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698