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

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

Issue 2433823003: Further refine div output when a div receives focus (Closed)
Patch Set: Created 4 years, 2 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 | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 speak: '$name' 440 speak: '$name'
441 }, 441 },
442 date: { 442 date: {
443 enter: '$nameFromNode $role $description' 443 enter: '$nameFromNode $role $description'
444 }, 444 },
445 dialog: { 445 dialog: {
446 enter: '$nameFromNode $role $description' 446 enter: '$nameFromNode $role $description'
447 }, 447 },
448 div: { 448 div: {
449 enter: '$nameFromNode', 449 enter: '$nameFromNode',
450 speak: '$name $description $descendants' 450 speak: '$textContent $description'
dmazzoni 2016/10/19 19:56:29 This is similar to nameOrDescendants except that i
451 }, 451 },
452 embeddedObject: { 452 embeddedObject: {
453 speak: '$name' 453 speak: '$name'
454 }, 454 },
455 grid: { 455 grid: {
456 enter: '$nameFromNode $role $description' 456 enter: '$nameFromNode $role $description'
457 }, 457 },
458 group: { 458 group: {
459 enter: '$nameFromNode $state $description', 459 enter: '$nameFromNode $state $description',
460 speak: '$nameOrDescendants $value $state $description', 460 speak: '$nameOrDescendants $value $state $description',
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 '@describe_radio_unselected($name)) $description' 530 '@describe_radio_unselected($name)) $description'
531 }, 531 },
532 radioGroup: { 532 radioGroup: {
533 enter: '$name $role $description' 533 enter: '$name $role $description'
534 }, 534 },
535 rootWebArea: { 535 rootWebArea: {
536 enter: '$name', 536 enter: '$name',
537 speak: '$if($name, $name, $docUrl)' 537 speak: '$if($name, $name, $docUrl)'
538 }, 538 },
539 region: { 539 region: {
540 speak: '$descendants' 540 speak: '$textContent'
541 }, 541 },
542 row: { 542 row: {
543 enter: '$node(tableRowHeader)' 543 enter: '$node(tableRowHeader)'
544 }, 544 },
545 rowHeader: { 545 rowHeader: {
546 speak: '$descendants $state' 546 speak: '$descendants $state'
547 }, 547 },
548 slider: { 548 slider: {
549 speak: '$earcon(SLIDER) @describe_slider($value, $name) $description ' + 549 speak: '$earcon(SLIDER) @describe_slider($value, $name) $description ' +
550 '$state' 550 '$state'
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 if (value == undefined) 1192 if (value == undefined)
1193 return; 1193 return;
1194 value = String(value + 1); 1194 value = String(value + 1);
1195 options.annotation.push(token); 1195 options.annotation.push(token);
1196 this.append_(buff, value, options); 1196 this.append_(buff, value, options);
1197 } else if (token == 'node') { 1197 } else if (token == 'node') {
1198 if (!tree.firstChild || !node[tree.firstChild.value]) 1198 if (!tree.firstChild || !node[tree.firstChild.value])
1199 return; 1199 return;
1200 var related = node[tree.firstChild.value]; 1200 var related = node[tree.firstChild.value];
1201 this.node_(related, related, Output.EventType.NAVIGATE, buff); 1201 this.node_(related, related, Output.EventType.NAVIGATE, buff);
1202 } else if (token == 'textContent') {
1203 if (node.name) {
1204 this.format_(node, '$name', buff);
1205 } else {
1206 node.findAll({role: RoleType.staticText}).forEach(function(text) {
1207 this.node_(text, text, Output.EventType.NAVIGATE, buff);
1208 }.bind(this));
1209 }
1202 } else if (node[token] !== undefined) { 1210 } else if (node[token] !== undefined) {
1203 options.annotation.push(token); 1211 options.annotation.push(token);
1204 var value = node[token]; 1212 var value = node[token];
1205 if (typeof value == 'number') 1213 if (typeof value == 'number')
1206 value = String(value); 1214 value = String(value);
1207 this.append_(buff, value, options); 1215 this.append_(buff, value, options);
1208 } else if (Output.STATE_INFO_[token]) { 1216 } else if (Output.STATE_INFO_[token]) {
1209 options.annotation.push('state'); 1217 options.annotation.push('state');
1210 var stateInfo = Output.STATE_INFO_[token]; 1218 var stateInfo = Output.STATE_INFO_[token];
1211 var resolvedInfo = {}; 1219 var resolvedInfo = {};
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 /** 1762 /**
1755 * Gets the output buffer for braille. 1763 * Gets the output buffer for braille.
1756 * @return {!Spannable} 1764 * @return {!Spannable}
1757 */ 1765 */
1758 get brailleOutputForTest() { 1766 get brailleOutputForTest() {
1759 return this.createBrailleOutput_(); 1767 return this.createBrailleOutput_();
1760 } 1768 }
1761 }; 1769 };
1762 1770
1763 }); // goog.scope 1771 }); // goog.scope
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698