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 <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 group = accessibilityController.accessibleElementById("group1"); | |
33 succeeded = group.isEnabled; | |
34 shouldBe("succeeded", "false"); | |
dmazzoni
2015/03/23 16:16:51
I know this existed before, but as long as you're
| |
35 | |
36 var link = accessibilityController.accessibleElementById("link1"); | |
37 succeeded = link.isEnabled; | |
38 shouldBe("succeeded", "false"); | |
39 | |
40 var button = accessibilityController.accessibleElementById("button1"); | |
41 succeeded = button.isEnabled; | |
42 shouldBe("succeeded", "true"); | |
27 } | 43 } |
28 | 44 |
29 </script> | 45 </script> |
30 | 46 |
31 </body> | 47 </body> |
32 </html> | 48 </html> |
OLD | NEW |