Bug 23979: AX: alt tag not returned for <input type="image">
https://bugs.webkit.org/show_bug.cgi?id=23979
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/accessibility/input-image-alt.html b/LayoutTests/accessibility/input-image-alt.html
new file mode 100644
index 0000000..373c5d4
--- /dev/null
+++ b/LayoutTests/accessibility/input-image-alt.html
@@ -0,0 +1,32 @@
+<html>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+<body id="body">
+
+ <!-- This test makes sure that an input image returns its alt tag as the description -->
+
+ <input type="image" alt="Submit" src="resources/cake.png" width=100 height=100 id="image1">
+
+ <div id="result"></div>
+
+ <script>
+ if (window.accessibilityController) {
+ var result = document.getElementById("result");
+
+ var image1 = document.getElementById("image1");
+ image1.focus();
+ var img = accessibilityController.focusedElement;
+
+ var pattern = "Description: Submit";
+ if (img.allAttributes().indexOf(pattern) != -1) {
+ result.innerText += "Test passed\n";
+ }
+ else {
+ result.innerText += "Test failed\n";
+ }
+ }
+ </script>
+</body>
+</html>