blob: 97f04b5f4280bd0a60d9deec41afda113b8c5609 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<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);
debug("tabList.role = " + tabList.role);
debug("tab1.role = " + tab1.role);
shouldBe("tab1.title", "'AXTitle: Crust'");
shouldBe("tab1.childrenCount", "0");
debug("tab2.role = " + tab2.role);
shouldBe("tab2.title", "'AXTitle: Veges'");
debug("tabPanel.role = " + tabPanel.role);
debug("tabPanel.subrole = " + tabPanel.subrole);
}
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>