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