Index: LayoutTests/accessibility/input-aria-required.html |
diff --git a/LayoutTests/accessibility/input-aria-required.html b/LayoutTests/accessibility/input-aria-required.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c3766a28cb7326b182923a41a473a7c16e0ce74f |
--- /dev/null |
+++ b/LayoutTests/accessibility/input-aria-required.html |
@@ -0,0 +1,37 @@ |
+<!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"); |
+} |
+</script> |
+ |
+</body> |
+</html> |