--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA-UAIG/1.0/tests/test-files/test41.html Tue Oct 29 13:08:24 2013 -0500
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>div element with role=menu and two descendant div elements with role=menuitem" and a focus event handler that reports it received focus, and another focusable element on the page that has initial focus</title>
+ <script type="text/javascript"><!--
+ function reportFocus(evt) {
+ var test = document.getElementById("test");
+ test.setAttribute("aria-activedescendant", evt.target.id);
+ var reporter = document.getElementById("report");
+ reporter.appendChild(reporter.ownerDocument.createTextNode("Element received focus: " + evt.target.id));
+ }
+ function setStartFocus() {
+ document.getElementById("startfocus").focus();
+ }
+ function setFocusReporter() {
+ document.getElementById("test").addEventListener("focus", reportFocus, true);
+ }
+ window.addEventListener("load", setFocusReporter, false);
+ window.setTimeout(setStartFocus, 3000);
+ </script>
+ </head>
+ <body>
+ <p>Use accessibility api request to set focus on one of the menuitems. <a href="#" id="startfocus">This link element has initial focus.</a></p>
+ <div id="test" tabindex="-1" role="menu">
+ <div id="item1" role="menuitem" tabindex="-1">Item 1</div>
+ <div id="item2" role="menuitem" tabindex="-1">Item 2</div>
+ </div>
+ <p id="report"></p>
+ </body>
+</html>