1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../fast/js/resources/js-test-pre.js"></script>
8 <ul id="menubar" role="menubar" aria-owns="menuitem1 menuitem2">
9 <li id="menuitem1" role="menuitem" tabindex="0" aria-owns="submenu1">
11 <ul id="submenu1" role="menu">
12 <li id="menuitem11" role="menuitemradio" tabindex="-1">
17 <li id="menuitem2" role="menuitem" tabindex="0" aria-owns="submenu2">
19 <ul id="submenu2" role="menu">
20 <li id="menuitem21" role="menuitemradio" tabindex="-1">
23 <li id="menuitem22" role="menuitemradio" tabindex="-1">
30 <p id="description"></p>
31 <div id="console"></div>
33 description("This tests that ARIA menu items are properly exposed as children for menu bars");
35 if (window.layoutController) {
36 testRunner.dumpAsText();
39 if (window.accessibilityController) {
40 document.getElementById("body").focus();
41 var webArea = accessibilityController.focusedElement;
43 var menuBar = webArea.childAtIndex(0);
45 shouldBe("menuBar.childrenCount", "2");
47 var menuItem = menuBar.childAtIndex(0);
49 shouldBe("menuItem.childrenCount", "2");
51 var menuSubItem1 = menuItem.childAtIndex(0);
52 debug(menuSubItem1.role);
53 shouldBe("menuSubItem1.childrenCount", "0");
55 var menuSubItem2 = menuItem.childAtIndex(1);
56 debug(menuSubItem2.role);
57 shouldBe("menuSubItem2.childrenCount", "1");
59 var subMenuSubItem = menuSubItem2.childAtIndex(0);
60 debug(subMenuSubItem.role);
61 shouldBe("subMenuSubItem.childrenCount", "0");
65 <script src="../fast/js/resources/js-test-post.js"></script>