summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/accessibility/aria-disabled.html
blob: 387a887670262cdfef0016d5d396dd84e2608b60 (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 type="text" aria-disabled="true" size=20>
<input type="text" aria-disabled="false" size=20>
<p id="description"></p>
<div id="console"></div>

<script>

    description("This tests that the aria-disabled attribute works. The text field should not be enabled.");

    if (window.accessibilityController) {

          var body = document.getElementById("body");
          body.focus();
          var textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
          var succeeded = textField.isEnabled;
          shouldBe("succeeded", "false");

          textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
          succeeded = textField.isEnabled;
          shouldBe("succeeded", "true");
    }

</script>

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