| <!DOCTYPE HTML> |
| <html> |
| <body> |
| <script src="../resources/js-test.js"></script> |
| <div> |
| <input id="text1" type="text" required value="Value"> |
| <input id="text2" type="text" aria-required="true"> |
| <input id="text3" type="text" aria-required="false"> |
| <input id="text4" type="text" required aria-required="false"> |
| <input id="text5" type="text" value="Value"> |
| </div> |
| <div id="console"></div> |
| <script> |
| description("This tests required and aria-required on input type."); |
| |
| if (window.accessibilityController) { |
| var input1 = accessibilityController.accessibleElementById("text1"); |
| shouldBe("input1.isRequired", "true"); |
| |
| var input2 = accessibilityController.accessibleElementById("text2"); |
| shouldBe("input2.isRequired", "true"); |
| |
| var input3 = accessibilityController.accessibleElementById("text3"); |
| shouldBe("input3.isRequired", "false"); |
| |
| var input4 = accessibilityController.accessibleElementById("text4"); |
| shouldBe("input4.isRequired", "true"); |
| |
| var input5 = accessibilityController.accessibleElementById("text5"); |
| shouldBe("input5.isRequired", "false"); |
| |
| document.querySelector("div").remove(); |
| } |
| </script> |
| |
| </body> |
| </html> |