55 lines
1.9 KiB
HTML
55 lines
1.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
</head>
|
|
<body id="body">
|
|
|
|
<header>header</header>
|
|
<footer>footer</footer>
|
|
<section>section</section>
|
|
<article>article</article>
|
|
<nav>nav</nav>
|
|
<aside>aside</aside>
|
|
|
|
<article>
|
|
<header>Should be IGNORED because it's inside an article, so it should not be a landmark</header>
|
|
<footer>Should be IGNORED because it's inside an article, so it should not be a landmark</footer>
|
|
</article>
|
|
|
|
<section>
|
|
<header>Should be IGNORED because it's inside a section, so it should not be a landmark</header>
|
|
<footer>Should be IGNORED because it's inside a section, so it should not be a landmark</footer>
|
|
</section>
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
|
|
description("This tests that the HTML5 section elements map to the correct AX roles.");
|
|
|
|
if (window.accessibilityController) {
|
|
|
|
document.getElementById("body").focus();
|
|
var body = accessibilityController.focusedElement;
|
|
shouldBe("body.childAtIndex(0).subrole", "'AXSubrole: AXLandmarkBanner'");
|
|
shouldBe("body.childAtIndex(1).subrole", "'AXSubrole: AXLandmarkContentInfo'");
|
|
shouldBe("body.childAtIndex(2).subrole", "'AXSubrole: '");
|
|
shouldBe("body.childAtIndex(3).subrole", "'AXSubrole: AXDocumentArticle'");
|
|
shouldBe("body.childAtIndex(4).subrole", "'AXSubrole: AXLandmarkNavigation'");
|
|
shouldBe("body.childAtIndex(5).subrole", "'AXSubrole: AXLandmarkComplementary'");
|
|
|
|
// When a header and footer are inside an article, they should not be landmarks.
|
|
shouldBe("body.childAtIndex(6).childAtIndex(0).subrole", "'AXSubrole: '");
|
|
|
|
// When a header and footer are inside a section, they should not be landmarks.
|
|
shouldBe("body.childAtIndex(7).childAtIndex(0).subrole", "'AXSubrole: '");
|
|
}
|
|
|
|
</script>
|
|
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|