--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test22.html Thu Oct 17 22:10:36 2013 -0400
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>a element with tabindex=0 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation</title>
+ <script type="text/javascript"><!--
+ function reportKeypress(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Yet keypress still detected on test element. "));
+ }
+ function reportKeydown(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Keydown detected on test element, canceling event. "));
+ stopDefault (evt);
+ cancelBubble (evt);
+ }
+ function attachListener(evt) {
+ document.getElementById("test").addEventListener("keypress", reportKeypress, false);
+ document.getElementById("test").addEventListener("keydown", reportKeydown, false);
+ }
+ function stopDefault (event) {
+ if (event && event.preventDefault)
+ event.preventDefault(); // W3C
+ else
+ window.event.returnValue = false; // IE < 9
+ }
+
+ function cancelBubble (event) {
+ if (event && event.stopPropagation)
+ event.stopPropagation(); // W3C
+ else
+ window.event.cancelBubble = true; // IE < 9
+ }
+ window.addEventListener("load", attachListener, false);
+ //--></script>
+ </head>
+ <body>
+ <p><button onclick="getElementById('test').focus()">Focus test</button></p>
+ <p>With focus on the following link, press a key. Note all key events are captured in this simple test file and pointing device will be required to move the focus away from the link. Yes, it's a WCAG violation.</p>
+ <p><a href="http://example.com" tabindex="0" id="test">Test element</a></p>
+ <p>Test result: <span id="report"/></p>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test23.html Thu Oct 17 22:10:36 2013 -0400
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>a element with tabindex=-1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation</title>
+ <script type="text/javascript"><!--
+ function reportKeypress(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Yet keypress still detected on test element. "));
+ }
+ function reportKeydown(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Keydown detected on test element, canceling event. "));
+ stopDefault (evt);
+ cancelBubble (evt);
+ }
+ function attachListener(evt) {
+ document.getElementById("test").addEventListener("keypress", reportKeypress, false);
+ document.getElementById("test").addEventListener("keydown", reportKeydown, false);
+ }
+ function stopDefault (event) {
+ if (event && event.preventDefault)
+ event.preventDefault(); // W3C
+ else
+ window.event.returnValue = false; // IE < 9
+ }
+
+ function cancelBubble (event) {
+ if (event && event.stopPropagation)
+ event.stopPropagation(); // W3C
+ else
+ window.event.cancelBubble = true; // IE < 9
+ }
+ window.addEventListener("load", attachListener, false);
+ //--></script>
+ </head>
+ <body>
+ <p><button onclick="getElementById('test').focus()">Focus test</button></p>
+ <p>With focus on the following link, press a key. Note all key events are captured in this simple test file and pointing device will be required to move the focus away from the link. Yes, it's a WCAG violation.</p>
+ <p><a href="http://example.com" tabindex="-1" id="test">Test element</a></p>
+ <p>Test result: <span id="report"/></p>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test24.html Thu Oct 17 22:10:36 2013 -0400
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>a element with tabindex=1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation</title>
+ <script type="text/javascript"><!--
+ function reportKeypress(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Yet keypress still detected on test element. "));
+ }
+ function reportKeydown(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Keydown detected on test element, canceling event. "));
+ stopDefault (evt);
+ cancelBubble (evt);
+ }
+ function attachListener(evt) {
+ document.getElementById("test").addEventListener("keypress", reportKeypress, false);
+ document.getElementById("test").addEventListener("keydown", reportKeydown, false);
+ }
+ function stopDefault (event) {
+ if (event && event.preventDefault)
+ event.preventDefault(); // W3C
+ else
+ window.event.returnValue = false; // IE < 9
+ }
+
+ function cancelBubble (event) {
+ if (event && event.stopPropagation)
+ event.stopPropagation(); // W3C
+ else
+ window.event.cancelBubble = true; // IE < 9
+ }
+ window.addEventListener("load", attachListener, false);
+ //--></script>
+ </head>
+ <body>
+ <p><button onclick="getElementById('test').focus()">Focus test</button></p>
+ <p>With focus on the following link, press a key. Note all key events are captured in this simple test file and pointing device will be required to move the focus away from the link. Yes, it's a WCAG violation.</p>
+ <p><a href="http://example.com" tabindex="1" id="test">Test element</a></p>
+ <p>Test result: <span id="report"/></p>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test25.html Thu Oct 17 22:10:36 2013 -0400
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>span element with tabindex=0 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation</title>
+ <script type="text/javascript"><!--
+ function reportKeypress(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Yet keypress still detected on test element. "));
+ }
+ function reportKeydown(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Keydown detected on test element, canceling event. "));
+ stopDefault (evt);
+ cancelBubble (evt);
+ }
+ function attachListener(evt) {
+ document.getElementById("test").addEventListener("keypress", reportKeypress, false);
+ document.getElementById("test").addEventListener("keydown", reportKeydown, false);
+ }
+ function stopDefault (event) {
+ if (event && event.preventDefault)
+ event.preventDefault(); // W3C
+ else
+ window.event.returnValue = false; // IE < 9
+ }
+
+ function cancelBubble (event) {
+ if (event && event.stopPropagation)
+ event.stopPropagation(); // W3C
+ else
+ window.event.cancelBubble = true; // IE < 9
+ }
+ window.addEventListener("load", attachListener, false);
+ //--></script>
+ </head>
+ <body>
+ <p><button onclick="getElementById('test').focus()">Focus test</button></p>
+ <p>With focus on the following span, press a key. Note all key events are captured in this simple test file and pointing device will be required to move the focus away from the link. Yes, it's a WCAG violation.</p>
+ <p><span tabindex="0" id="test">Test element</span></p>
+ <p>Test result: <span id="report"/></p>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test26.html Thu Oct 17 22:10:36 2013 -0400
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>span element with tabindex=-1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation</title>
+ <script type="text/javascript"><!--
+ function reportKeypress(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Yet keypress still detected on test element. "));
+ }
+ function reportKeydown(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Keydown detected on test element, canceling event. "));
+ stopDefault (evt);
+ cancelBubble (evt);
+ }
+ function attachListener(evt) {
+ document.getElementById("test").addEventListener("keypress", reportKeypress, false);
+ document.getElementById("test").addEventListener("keydown", reportKeydown, false);
+ }
+ function stopDefault (event) {
+ if (event && event.preventDefault)
+ event.preventDefault(); // W3C
+ else
+ window.event.returnValue = false; // IE < 9
+ }
+
+ function cancelBubble (event) {
+ if (event && event.stopPropagation)
+ event.stopPropagation(); // W3C
+ else
+ window.event.cancelBubble = true; // IE < 9
+ }
+ window.addEventListener("load", attachListener, false);
+ //--></script>
+ </head>
+ <body>
+ <p><button onclick="getElementById('test').focus()">Focus test</button></p>
+ <p>With focus on the following span, press a key. Note all key events are captured in this simple test file and pointing device will be required to move the focus away from the link. Yes, it's a WCAG violation.</p>
+ <p><span tabindex="-1" id="test">Test element</span></p>
+ <p>Test result: <span id="report"/></p>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test27.html Thu Oct 17 22:10:36 2013 -0400
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>span element with tabindex=1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation</title>
+ <script type="text/javascript"><!--
+ function reportKeypress(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Yet keypress still detected on test element. "));
+ }
+ function reportKeydown(evt) {
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode(" Keydown detected on test element, canceling event. "));
+ stopDefault (evt);
+ cancelBubble (evt);
+ }
+ function attachListener(evt) {
+ document.getElementById("test").addEventListener("keypress", reportKeypress, false);
+ document.getElementById("test").addEventListener("keydown", reportKeydown, false);
+ }
+ function stopDefault (event) {
+ if (event && event.preventDefault)
+ event.preventDefault(); // W3C
+ else
+ window.event.returnValue = false; // IE < 9
+ }
+
+ function cancelBubble (event) {
+ if (event && event.stopPropagation)
+ event.stopPropagation(); // W3C
+ else
+ window.event.cancelBubble = true; // IE < 9
+ }
+ window.addEventListener("load", attachListener, false);
+ //--></script>
+ </head>
+ <body>
+ <p><button onclick="getElementById('test').focus()">Focus test</button></p>
+ <p>With focus on the following span, press a key. Note all key events are captured in this simple test file and pointing device will be required to move the focus away from the link. Yes, it's a WCAG violation.</p>
+ <p><span tabindex="1" id="test">Test element</span></p>
+ <p>Test result: <span id="report"/></p>
+ </body>
+</html>
\ No newline at end of file