fix test36 to use a button
authorRichard Schwerdtfeger <schwer@us.ibm.com>
Thu, 12 Sep 2013 16:30:43 -0500
changeset 355 5a0487492f98
parent 354 0e0040b9d27f
child 356 6071e2caa500
fix test36 to use a button
ARIA-UAIG/1.0/tests/test-files/test36.html
--- a/ARIA-UAIG/1.0/tests/test-files/test36.html	Thu Sep 12 12:28:51 2013 -0400
+++ b/ARIA-UAIG/1.0/tests/test-files/test36.html	Thu Sep 12 16:30:43 2013 -0500
@@ -2,14 +2,15 @@
 <html>
 	<head>
 		<title>div element with role="menu" and tabindex=0 and aria-activedescendant referencing a descendant div element with role=menuitem, and script that aria-activedescendant on the menu to a non-valid id reference</title>
-		<script type="text/javascript"><!--
-			function changeActivedescendant(evt) {
-				document.getElementById("test").setAttribute("aria-activedescendant", "item4");
+		<script type="text/javascript">
+			function changeActivedescendant() {
+                                var test = document.getElementById("test");
+                                test.focus(); 
+				test.setAttribute("aria-activedescendant", "item4");
 				var reporter = document.getElementById("report");
 				reporter.appendChild(reporter.ownerDocument.createTextNode("Script has set active descendant to \"item4\" (which doesn't exist)."));
 			}
-			window.addEventListener("load", changeActivedescendant, false);
-		//--></script>
+		</script>
 	</head>
 	<body>
 		<div id="test" tabindex="0" role="menu" aria-activedescendant="item2">
@@ -17,6 +18,7 @@
 			<div id="item2" role="menuitem">Focused Item 2</div>
 			<div id="item3" role="menuitem">Item 3</div>
 		</div>
+                <input type="button" value="change activedescendant" onclick="changeActivedescendant()">
 		<p id="report"></p>
 	</body>
-</html>
\ No newline at end of file
+</html>