summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/accessibility/aria-hidden.html
blob: 5235846e3f1eb6271d1e6e0ffbd99f140a9c07a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<h1 aria-hidden="true">h1 <b>test</b></h1>
<h2 aria-hidden="false">h2</h2>
<p id="description"></p>
<div id="console"></div>

<script>

    description("This tests that the aria-hidden attribute works correctly with accessibility. The H1 element (and its children) should not appear in the AX hierarchy. The H2 element should be the first child");

    if (window.accessibilityController) {

          var body = document.getElementById("body");
          body.focus();
          var h2 = accessibilityController.focusedElement.childAtIndex(0);
          shouldBe("h2.title", "'AXTitle: h2'");
    }

</script>

</body>
</html>