blob: 680191ac13cae582bd40b31a4dc9ebd3ee29640f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
var successfullyParsed = false;
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<div id="fakeButton" tabindex=0 role="tab" aria-selected="true">tab1</div>
<input type="button" tabindex=0 id="realButton" value="button">
<p id="description"></p>
<div id="console"></div>
<script>
description("This test makes sure that role='tab' shows up as a distinct element from button.");
if (window.accessibilityController) {
document.getElementById("fakeButton").focus();
var tab = accessibilityController.focusedElement;
shouldBe("tab.description", "'AXLabel: tab1'");
// Now make sure it has the same traits as a button.
document.getElementById("realButton").focus();
var button = accessibilityController.focusedElement;
shouldBeTrue("button.traits != tab.traits");
shouldBeTrue("tab.traits != 0");
shouldBeTrue("tab.isSelected");
}
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>