make sure setting focus before changing active descendant
authorRichard Schwerdtfeger <schwer@us.ibm.com>
Wed, 11 Sep 2013 17:36:57 -0500
changeset 347 51efdf12e9b7
parent 346 08b021bd70c4
child 348 5a5a42107c87
make sure setting focus before changing active descendant
ARIA-UAIG/1.0/tests/test-files/test34.html
--- a/ARIA-UAIG/1.0/tests/test-files/test34.html	Tue Sep 10 11:14:05 2013 -0400
+++ b/ARIA-UAIG/1.0/tests/test-files/test34.html	Wed Sep 11 17:36:57 2013 -0500
@@ -4,7 +4,9 @@
 		<title>div element with role="menu" and tabindex=0 and aria-activedescendant that references one of two descendant div elements with role=menuitem, and script that changes aria-activedescendant value of menu from one of the menuitems to the other</title>
 		<script type="text/javascript"><!--
 			function changeActivedescendant(evt) {
-				document.getElementById("test").setAttribute("aria-activedescendant", "item3");
+                                var test = document.getElementById("test");
+                                test.focus();
+				test.setAttribute("aria-activedescendant", "item3");
 				var reporter = document.getElementById("report");
 				reporter.appendChild(reporter.ownerDocument.createTextNode("Script has set active descendant to Item 3."));
 			}
@@ -19,4 +21,4 @@
 		</div>
 		<p id="report"></p>
 	</body>
-</html>
\ No newline at end of file
+</html>