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

Unified Diff: LayoutTests/accessibility/aria-tables.html

Issue 869253002: Aria table row and column headers are not exposed in accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/accessibility/aria-tables-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/aria-tables.html
diff --git a/LayoutTests/accessibility/aria-tables.html b/LayoutTests/accessibility/aria-tables.html
new file mode 100644
index 0000000000000000000000000000000000000000..06029a1b197bd57590bfbf75547c26fb97375ab5
--- /dev/null
+++ b/LayoutTests/accessibility/aria-tables.html
@@ -0,0 +1,48 @@
+<script src="../resources/js-test.js"></script>
+<body id="body">
+<div role="grid">
+ <div role="row">
+ <div role="columnheader">col head</div>
+ <div role="columnheader">col head</div>
+ <div role="columnheader">col head</div>
+ </div>
+ <div role="row">
+ <div role="rowheader">row head</div>
+ <div role="gridcell">data</div>
+ <div role="rowheader">row head</div>
+ </div>
+ <div role="row">
+ <div role="rowheader">row head</div>
+ <div role="rowheader">row head</div>
+ <div role="columnheader">col head</div>
+ </div>
+</div>
+</body>
+<p>End of test</p>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+ function buildAccessibilityTree(accessibilityObject, i) {
dmazzoni 2015/01/23 19:02:06 We're using buildAccessibilityTree in 9 tests now
+ if(accessibilityObject.stringValue.indexOf('End of test') >= 0)
+ return false;
+
+ if (accessibilityObject.role == 'AXRole: AXColumn' || accessibilityObject.role == 'AXRole: AXTableHeaderContainer')
+ return true;
+
+ var indent = "";
+ for (var k = 0; k < i; k++)
+ indent += " ";
+ debug(indent + accessibilityObject.role + " " + accessibilityObject.stringValue);
+ var childrenCount = accessibilityObject.childrenCount;
+ for (var j = 0; j < childrenCount; j++) {
+ if (!buildAccessibilityTree(accessibilityObject.childAtIndex(j), i + 1))
+ return false;
+ }
+ return true;
+ }
+
+if (window.accessibilityController) {
+ document.getElementById("body").focus();
+ buildAccessibilityTree(accessibilityController.focusedElement, 0);
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/accessibility/aria-tables-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698