OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body id="body"> | 6 <body id="body"> |
7 <input type="text" aria-disabled="true" size=20> | 7 <input type="text" aria-disabled="true" size=20> |
8 <input type="text" aria-disabled="false" size=20> | 8 <input type="text" aria-disabled="false" size=20> |
| 9 <div role="group" id="group1" aria-disabled="true"> |
| 10 <div role="group"> |
| 11 <a id="link1" href="#">link</a> |
| 12 <button id="button1" type="submit" aria-disabled="false">submit</button> |
| 13 <div> |
| 14 <div> |
| 15 </div> |
9 <p id="description"></p> | 16 <p id="description"></p> |
10 <div id="console"></div> | 17 <div id="console"></div> |
11 | 18 |
12 <script> | 19 <script> |
13 | 20 |
14 description("This tests that the aria-disabled attribute works. The text fie
ld should not be enabled."); | 21 description("This tests that the aria-disabled attribute works. The text fie
ld should not be enabled."); |
15 | 22 |
16 if (window.accessibilityController) { | 23 if (window.accessibilityController) { |
17 | 24 |
18 var body = document.getElementById("body"); | 25 var body = document.getElementById("body"); |
19 body.focus(); | 26 body.focus(); |
20 var textField = accessibilityController.focusedElement.childAtIndex(0)
.childAtIndex(0); | 27 var textField = accessibilityController.focusedElement.childAtIndex(0)
.childAtIndex(0); |
21 var succeeded = textField.isEnabled; | 28 shouldBe("textField.isEnabled", "false"); |
22 shouldBe("succeeded", "false"); | |
23 | 29 |
24 textField = accessibilityController.focusedElement.childAtIndex(0).chi
ldAtIndex(1); | 30 textField = accessibilityController.focusedElement.childAtIndex(0).chi
ldAtIndex(1); |
25 succeeded = textField.isEnabled; | 31 shouldBe("textField.isEnabled", "true"); |
26 shouldBe("succeeded", "true"); | 32 |
| 33 var group = accessibilityController.accessibleElementById("group1"); |
| 34 shouldBe("group.isEnabled", "false"); |
| 35 |
| 36 var link = accessibilityController.accessibleElementById("link1"); |
| 37 shouldBe("link.isEnabled", "false"); |
| 38 |
| 39 var button = accessibilityController.accessibleElementById("button1"); |
| 40 shouldBe("button.isEnabled", "true"); |
27 } | 41 } |
28 | 42 |
29 </script> | 43 </script> |
30 | 44 |
31 </body> | 45 </body> |
32 </html> | 46 </html> |
OLD | NEW |