Title: [139534] trunk/LayoutTests
- Revision
- 139534
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-11 18:07:18 -0800 (Fri, 11 Jan 2013)
Log Message
Need new accessibility layout test to verify levels of headings
https://bugs.webkit.org/show_bug.cgi?id=106243
Patch by James Craig <ja...@cookiecrook.com> on 2013-01-11
Reviewed by Chris Fleizach.
New layout test to verify accessibility API heading levels on implicit h1-h6 and explicit @aria-level.
* accessibility/heading-level-expected.txt: Added.
* accessibility/heading-level.html: Added.
* platform/chromium/TestExpectations: Skip for Chromium due to webkit.org/b/106682
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (139533 => 139534)
--- trunk/LayoutTests/ChangeLog 2013-01-12 02:05:52 UTC (rev 139533)
+++ trunk/LayoutTests/ChangeLog 2013-01-12 02:07:18 UTC (rev 139534)
@@ -1,3 +1,16 @@
+2013-01-11 James Craig <ja...@cookiecrook.com>
+
+ Need new accessibility layout test to verify levels of headings
+ https://bugs.webkit.org/show_bug.cgi?id=106243
+
+ Reviewed by Chris Fleizach.
+
+ New layout test to verify accessibility API heading levels on implicit h1-h6 and explicit @aria-level.
+
+ * accessibility/heading-level-expected.txt: Added.
+ * accessibility/heading-level.html: Added.
+ * platform/chromium/TestExpectations: Skip for Chromium due to webkit.org/b/106682
+
2013-01-11 Filip Pizlo <fpi...@apple.com>
Phantom(GetLocal) should be treated as relevant to OSR
Added: trunk/LayoutTests/accessibility/heading-level-expected.txt (0 => 139534)
--- trunk/LayoutTests/accessibility/heading-level-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/heading-level-expected.txt 2013-01-12 02:07:18 UTC (rev 139534)
@@ -0,0 +1,27 @@
+This tests that headings have a level matching the implicit default value or explicitly defined aria-level value.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS: level is 1.
+PASS: level is 2.
+PASS: level is 3.
+PASS: level is 4.
+PASS: level is 5.
+PASS: level is 6.
+PASS: level is 1.
+PASS: level is 2.
+PASS: level is 3.
+PASS: level is 4.
+PASS: level is 5.
+PASS: level is 6.
+PASS: level is 1.
+PASS: level is 2.
+PASS: level is 3.
+PASS: level is 4.
+PASS: level is 5.
+PASS: level is 6.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/heading-level.html (0 => 139534)
--- trunk/LayoutTests/accessibility/heading-level.html (rev 0)
+++ trunk/LayoutTests/accessibility/heading-level.html 2013-01-12 02:07:18 UTC (rev 139534)
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<script src=""
+
+<!-- implicit level of tag -->
+<h1 class="ex" data-expected="1">X</h1>
+<h2 class="ex" data-expected="2">X</h2>
+<h3 class="ex" data-expected="3">X</h3>
+<h4 class="ex" data-expected="4">X</h4>
+<h5 class="ex" data-expected="5">X</h5>
+<h6 class="ex" data-expected="6">X</h6>
+
+<!-- explicit aria-level overrides on h1-h6 (withOUT explicit heading role declaration) does not work in current WebKit. -->
+<!-- Waiting on thread resolution to determine if it's a bug: http://lists.w3.org/Archives/Public/wai-xtech/2013Jan/0019.html -->
+<!--
+<h6 class="ex" data-expected="1" aria-level="1">X</h6>
+<h5 class="ex" data-expected="2" aria-level="2">X</h5>
+<h4 class="ex" data-expected="3" aria-level="3">X</h4>
+<h3 class="ex" data-expected="4" aria-level="4">X</h3>
+<h2 class="ex" data-expected="5" aria-level="5">X</h2>
+<h1 class="ex" data-expected="6" aria-level="6">X</h1>
+-->
+
+<!-- explicit aria-level overrides on h1-h6 (with explicit heading role declaration) -->
+<h6 class="ex" role="heading" data-expected="1" aria-level="1">X</h6>
+<h5 class="ex" role="heading" data-expected="2" aria-level="2">X</h5>
+<h4 class="ex" role="heading" data-expected="3" aria-level="3">X</h4>
+<h3 class="ex" role="heading" data-expected="4" aria-level="4">X</h3>
+<h2 class="ex" role="heading" data-expected="5" aria-level="5">X</h2>
+<h1 class="ex" role="heading" data-expected="6" aria-level="6">X</h1>
+
+<!-- explicit aria-level set on div with explicit heading role declaration -->
+<div class="ex" role="heading" data-expected="1" aria-level="1">X</div>
+<div class="ex" role="heading" data-expected="2" aria-level="2">X</div>
+<div class="ex" role="heading" data-expected="3" aria-level="3">X</div>
+<div class="ex" role="heading" data-expected="4" aria-level="4">X</div>
+<div class="ex" role="heading" data-expected="5" aria-level="5">X</div>
+<div class="ex" role="heading" data-expected="6" aria-level="6">X</div>
+
+<!-- todo: h1 elements nested in section elements should inherit nested level. -->
+
+<div id="console"></div>
+<script>
+if (window.testRunner && window.accessibilityController) {
+ description("This tests that headings have a level matching the implicit default value or explicitly defined aria-level value.")
+ var examples = document.querySelectorAll('.ex');
+ for (var i = 0, c = examples.length; i < c; i++) {
+ var el = examples[i];
+ el.id = 'ex' + i;
+ var axElement = accessibilityController.accessibleElementById(el.id);
+ var result = document.getElementById('console');
+
+ // Test AXLevel.
+ if (axElement.intValue == parseInt(el.getAttribute('data-expected'))) {
+ result.innerText += "PASS: level is " + axElement.intValue + ".\n";
+ } else {
+ result.innerText += "FAIL: level is " + axElement.intValue + " for " + el.outerHTML + ", expected " + parseInt(el.getAttribute('data-expected')) + ".\n";
+ }
+ el.style.display = 'none'; // Hide each example after verification.
+ }
+}
+</script>
+<script src=""
+</body>
+</html>
\ No newline at end of file
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (139533 => 139534)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2013-01-12 02:05:52 UTC (rev 139533)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-01-12 02:07:18 UTC (rev 139534)
@@ -1434,6 +1434,7 @@
webkit.org/b/96529 accessibility/hidden-legend.html [ Skip ]
webkit.org/b/73912 accessibility/aria-checkbox-text.html [ Skip ]
webkit.org/b/99665 accessibility/loading-iframe-sends-notification.html [ Skip ]
+webkit.org/b/106682 accessibility/heading-level.html [ Skip ]
webkit.org/b/73912 accessibility/aria-checkbox-sends-notification.html [ Failure Pass ]
#webkit.org/b/98787 accessibility/aria-hidden-negates-no-visibility.html [ Skip ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes