| 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 aria-disabled="true"> |
| 10 <a id="link1" href="#">link</a> |
| 11 <button id="button1" type="submit" aria-disabled="false">submit</button> |
| 12 </div> |
| 9 <p id="description"></p> | 13 <p id="description"></p> |
| 10 <div id="console"></div> | 14 <div id="console"></div> |
| 11 | 15 |
| 12 <script> | 16 <script> |
| 13 | 17 |
| 14 description("This tests that the aria-disabled attribute works. The text fie
ld should not be enabled."); | 18 description("This tests that the aria-disabled attribute works. The text fie
ld should not be enabled."); |
| 15 | 19 |
| 16 if (window.accessibilityController) { | 20 if (window.accessibilityController) { |
| 17 | 21 |
| 18 var body = document.getElementById("body"); | 22 var body = document.getElementById("body"); |
| 19 body.focus(); | 23 body.focus(); |
| 20 var textField = accessibilityController.focusedElement.childAtIndex(0)
.childAtIndex(0); | 24 var textField = accessibilityController.focusedElement.childAtIndex(0)
.childAtIndex(0); |
| 21 var succeeded = textField.isEnabled; | 25 var succeeded = textField.isEnabled; |
| 22 shouldBe("succeeded", "false"); | 26 shouldBe("succeeded", "false"); |
| 23 | 27 |
| 24 textField = accessibilityController.focusedElement.childAtIndex(0).chi
ldAtIndex(1); | 28 textField = accessibilityController.focusedElement.childAtIndex(0).chi
ldAtIndex(1); |
| 25 succeeded = textField.isEnabled; | 29 succeeded = textField.isEnabled; |
| 26 shouldBe("succeeded", "true"); | 30 shouldBe("succeeded", "true"); |
| 31 |
| 32 var link = accessibilityController.accessibleElementById("link1"); |
| 33 succeeded = link.isEnabled; |
| 34 shouldBe("succeeded", "false"); |
| 35 |
| 36 var button = accessibilityController.accessibleElementById("button1"); |
| 37 succeeded = button.isEnabled; |
| 38 shouldBe("succeeded", "false"); |
| 27 } | 39 } |
| 28 | 40 |
| 29 </script> | 41 </script> |
| 30 | 42 |
| 31 </body> | 43 </body> |
| 32 </html> | 44 </html> |
| OLD | NEW |