OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <body> |
| 4 <script src="../resources/js-test.js"></script> |
| 5 |
| 6 <div> |
| 7 <input id="text1" type="text" required value="Value"> |
| 8 <input id="text2" type="text" aria-required="true"> |
| 9 <input id="text3" type="text" aria-required="false"> |
| 10 <input id="text4" type="text" required aria-required="false"> |
| 11 <input id="text5" type="text" value="Value"> |
| 12 </div> |
| 13 |
| 14 <div id="console"></div> |
| 15 <script> |
| 16 description("This tests required and aria-required on input type."); |
| 17 |
| 18 if (window.accessibilityController) { |
| 19 var input1 = accessibilityController.accessibleElementById("text1"); |
| 20 shouldBe("input1.isRequired", "true"); |
| 21 |
| 22 var input2 = accessibilityController.accessibleElementById("text2"); |
| 23 shouldBe("input2.isRequired", "true"); |
| 24 |
| 25 var input3 = accessibilityController.accessibleElementById("text3"); |
| 26 shouldBe("input3.isRequired", "false"); |
| 27 |
| 28 var input4 = accessibilityController.accessibleElementById("text4"); |
| 29 shouldBe("input4.isRequired", "true"); |
| 30 |
| 31 var input5 = accessibilityController.accessibleElementById("text5"); |
| 32 shouldBe("input5.isRequired", "false"); |
| 33 } |
| 34 </script> |
| 35 |
| 36 </body> |
| 37 </html> |
OLD | NEW |