blob: e39a7a63fd6a1ca6fff81a7afe13804a173f6741 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
<script src="../resources/accessibility-helper.js"></script>
</head>
<body id="body">
<div id="textrole" tabindex=0 role="text" aria-label="all at once">
<b>hello world</b>
<i>this is a test</i>
<a href="#">more test</a>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that you can set an ARIA text role and that it will not have children through hit testing");
if (window.accessibilityController) {
document.getElementById("textrole").focus();
var textrole = accessibilityController.focusedElement;
shouldBe("textrole.role", "platformRoleForStaticText(textrole)");
shouldBe("textrole.stringValue", "'AXValue: all at once'");
// now check the hit-testing
var x = textrole.clickPointX;
var y = textrole.clickPointY;
shouldBe("textrole.elementAtPoint(x, y).isEqual(textrole)", "true");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>