Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / accessibility / aria-readonly.html
blobfa2175715fc8662a541f9e72910f3c8b0110dd6c
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
5 <script>
6 var successfullyParsed = false;
7 </script>
8 <script src="../fast/js/resources/js-test-pre.js"></script>
9 </head>
10 <body id="body">
11 <input type="text" aria-readonly="true" size=20>
12 <input type="text" aria-readonly="false" size=20>
13 <input type="text" readonly="readonly" size=20>
14 <input type="text" size=20>
15 <textarea rows="2" cols="20" readonly="readonly"></textarea>
16 <textarea rows="2" cols="20"></textarea>
17 <p id="description"></p>
18 <div id="console"></div>
20 <script>
22 description("This tests that the aria-readonly attribute works. The first and third text fields should not be writable.");
24 if (window.accessibilityController) {
26 var body = document.getElementById("body");
27 body.focus();
28 var textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
29 var succeeded = textField.isAttributeSettable("AXValue");
30 shouldBe("succeeded", "false");
32 textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1);
33 succeeded = textField.isAttributeSettable("AXValue");
34 shouldBe("succeeded", "true");
36 textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(2);
37 succeeded = textField.isAttributeSettable("AXValue");
38 shouldBe("succeeded", "false");
40 textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(3);
41 succeeded = textField.isAttributeSettable("AXValue");
42 shouldBe("succeeded", "true");
44 textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(4);
45 succeeded = textField.isAttributeSettable("AXValue");
46 shouldBe("succeeded", "false");
48 textField = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(5);
49 succeeded = textField.isAttributeSettable("AXValue");
50 shouldBe("succeeded", "true");
53 successfullyParsed = true;
54 </script>
56 <script src="../fast/js/resources/js-test-post.js"></script>
57 </body>
58 </html>