blob: 123aa91a3a7a4e72a64cc639f3f2e21752eb8b7f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body>
<div role="tablist" id="tablist">
<button id="tab a" role="tab" aria-selected="true">Tab A</button>
<button id="tab b" role="tab" aria-selected="false">Tab B</button>
<button id="tab c" role="tab" aria-selected="false">Tab C</button>
</div>
<script>
description("This tests that the aria roles for tab and tablist work as expected for buttons.");
if (window.accessibilityController) {
let output = "";
let tabList = accessibilityController.accessibleElementById("tablist");
let tab1 = tabList.childAtIndex(0);
let tab2 = tabList.childAtIndex(1);
output += `tabList.role = ${tabList.role}\n`;
output += `tab1.role = ${tab1.role}\n`;
output += `tab1.title = ${tab1.title}\n`;
output += `tab1.childrenCount = ${tab1.childrenCount}\n`;
output += `tab2.role = ${tab2.role}\n`;
output += `tab2.title = ${tab2.title}\n`;
debug(output);
}
</script>
</body>
</html>