blob: 4709551f59201b3eaf7c0845f0385d19da933ee3 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<a id="button1" tabindex="0" class="button" href="#" aria-haspopup="true" role="button">Options</a>
<span id="button2" class="button" tabindex="0" role="button" aria-haspopup="true">Options</span>
<button id="button3" type="button" aria-haspopup="true">Options</button>
<input id="button4" type="button" aria-haspopup="true" value="Options">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that native style buttons with aria-haspopup appear as popup buttons.");
if (window.accessibilityController) {
for (var k = 1; k < 5; k++) {
document.getElementById("button" + k).focus();
var button = accessibilityController.focusedElement;
shouldBe("button.role", "'AXRole: AXPopUpButton'");
shouldBe("button.title", "'AXTitle: Options'");
// Verify that the title is not duplicated as the AXValue
shouldBe("button.stringValue", "'AXValue: '");
}
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>