summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/accessibility/aria-label.html
blob: 02f9bac31898de1bd0dccd76ee694e2abb4c0fcc (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
28
29
30
31
32
33
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../fast/js/resources/js-test-pre.js"></script>
</head>
<body id="body">
<input aria-label="aria label" type="text" size=20>
<a href="#" aria-label="aria link">test</a>
<p id="description"></p>
<div id="console"></div>

<script>

    description("This tests that the aria-label attribute works. The input and the A tag should return the appropriate description.");

    if (window.accessibilityController) {

          var body = document.getElementById("body");
          body.focus();
          var obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
          var succeeded = obj.description == "AXDescription: aria label";
          shouldBe("succeeded", "true");

          obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
          succeeded = obj.description == "AXDescription: aria link";
          shouldBe("succeeded", "true");
    }

</script>

<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>