| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"> |
| <script> |
| var successfullyParsed = false; |
| </script> |
| <script src="../fast/js/resources/js-test-pre.js"></script> |
| </head> |
| <body id="body"> |
| |
| <ul id="tablist_1" role="tablist"> |
| <li id="tab_1" role="tab" tabindex="0" class="">Crust</li> |
| <li id="tab_2" role="tab" tabindex="0" class="">Veges</li> |
| </ul> |
| |
| <div id="panel_1" role="tabpanel" aria-labelledby="tab_1" > |
| <h3>Select Crust</h3> |
| </div> |
| |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that the aria roles for tab, tabpanel and tablist work as expected correctly."); |
| |
| if (window.accessibilityController) { |
| |
| var body = document.getElementById("body"); |
| body.focus(); |
| |
| var tabList = accessibilityController.focusedElement.childAtIndex(0); |
| var tab1 = tabList.childAtIndex(0); |
| var tab2 = tabList.childAtIndex(1); |
| var tabPanel = accessibilityController.focusedElement.childAtIndex(1); |
| |
| shouldBe("tabList.role", "'AXRole: AXTabGroup'"); |
| shouldBe("tab1.role", "'AXRole: AXRadioButton'"); |
| shouldBe("tab1.title", "'AXTitle: Crust'"); |
| shouldBe("tab1.childrenCount", "0"); |
| shouldBe("tab2.role", "'AXRole: AXRadioButton'"); |
| shouldBe("tab2.title", "'AXTitle: Veges'"); |
| shouldBe("tabPanel.role", "'AXRole: AXGroup'"); |
| shouldBe("tabPanel.subrole", "'AXSubrole: AXTabPanel'"); |
| } |
| |
| successfullyParsed = true; |
| </script> |
| |
| <script src="../fast/js/resources/js-test-post.js"></script> |
| </body> |
| </html> |