haikuwebkit/LayoutTests/accessibility/mac/element-focus.html

41 lines
1.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<a href="#">link</a><br>
<div role="text" aria-label="text" tabindex=0>text</div>
<div role="alertdialog" tabindex="0">foo</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that any element that supports focus has a writable AXFocused");
if (window.accessibilityController) {
var root = accessibilityController.rootElement;
var body = root.childAtIndex(0);
shouldBe("body.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXLink'");
shouldBe("body.childAtIndex(0).childAtIndex(0).isAttributeSettable('AXFocused')", "true");
shouldBe("body.childAtIndex(1).role", "'AXRole: AXStaticText'");
shouldBe("body.childAtIndex(1).isAttributeSettable('AXFocused')", "true");
shouldBe("body.childAtIndex(2).role", "'AXRole: AXGroup'");
shouldBe("body.childAtIndex(2).isAttributeSettable('AXFocused')", "true");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>