1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
8 <ul id=
"tablist_1" role=
"tablist">
9 <li id=
"tab_1" role=
"tab" tabindex=
"0" class=
"">Crust
</li>
10 <li id=
"tab_2" role=
"tab" tabindex=
"0" class=
"">Veges
</li>
13 <div id=
"panel_1" role=
"tabpanel" aria-labelledby=
"tab_1" >
18 <p id=
"description"></p>
19 <div id=
"console"></div>
23 description("This tests that the aria roles for tab, tabpanel and tablist work as expected correctly.");
25 if (window
.accessibilityController
) {
27 var body
= document
.getElementById("body");
30 var tabList
= accessibilityController
.focusedElement
.childAtIndex(0);
31 var tab1
= tabList
.childAtIndex(0);
32 var tab2
= tabList
.childAtIndex(1);
33 var tabPanel
= accessibilityController
.focusedElement
.childAtIndex(1);
35 debug("tabList.role = " + tabList
.role
);
36 debug("tab1.role = " + tab1
.role
);
37 shouldBe("tab1.deprecatedTitle", "'AXTitle: Crust'");
38 shouldBe("tab1.childrenCount", "0");
39 debug("tab2.role = " + tab2
.role
);
40 shouldBe("tab2.deprecatedTitle", "'AXTitle: Veges'");
41 debug("tabPanel.role = " + tabPanel
.role
);
42 debug("tabPanel.subrole = " + tabPanel
.subrole
);