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

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

Issue 2799443002: Implemented ARIA colindex, rowindex, colcount and rowcount for Chromevox. (Closed)
Patch Set: Fixed automation test. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
index d3fd9de3d1c930613dafdfa71934ab8cd54a431e..c5b339608f32739ec4444e83996043bb46ba5d01 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -427,10 +427,12 @@ Output.RULES = {
speak: '$earcon(ALERT_MODAL) $name $nameOrTextContent $state $role'
},
cell: {
David Tseng 2017/04/11 03:48:09 Also, I think you also want to modify the output r
- enter: '@cell_summary($tableCellRowIndex, $tableCellColumnIndex) ' +
- '$node(tableColumnHeader)',
- speak: '@cell_summary($tableCellRowIndex, $tableCellColumnIndex) ' +
- '$node(tableColumnHeader) $state'
+ enter: '@cell_summary($if($ariaCellRowIndex, $ariaCellRowIndex,' +
David Tseng 2017/04/11 03:40:55 Is the aria row index here possibly 0? $if would e
+ '$tableCellRowIndex), $if($ariaCellColumnIndex, $ariaCellColumnIndex,' +
+ '$tableCellColumnIndex)) $node(tableColumnHeader)',
+ speak: '@cell_summary($if($ariaCellRowIndex, $ariaCellRowIndex,' +
+ '$tableCellRowIndex), $if($ariaCellColumnIndex, $ariaCellColumnIndex,' +
+ '$tableCellColumnIndex)) $node(tableColumnHeader) $state'
},
checkBox: {
speak: '$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) ' +
@@ -1251,6 +1253,13 @@ Output.prototype = {
value = String(value + 1);
options.annotation.push(token);
this.append_(buff, value, options);
+ } else if (token == 'ariaCellRowIndex' ||
David Tseng 2017/04/11 03:40:55 The $ prefix defaults to an attribute lookup so th
+ token == 'ariaCellColumnIndex') {
+ var value = node[token];
+ if (value == undefined)
David Tseng 2017/04/11 03:40:55 You don't need this if you're already using $if ab
+ return;
+ options.annotation.push(token);
+ this.append_(buff, value, options);
} else if (token == 'node') {
if (!tree.firstChild || !node[tree.firstChild.value])
return;
« no previous file with comments | « no previous file | chrome/common/extensions/api/automation.idl » ('j') | chrome/common/extensions/api/automation.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698