blob: c6c19e2058a186457eb8d06112541aa740a23a57 [file] [log] [blame]
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +00001<html>
cfleizach@apple.comb581ef62010-05-05 01:11:03 +00002<html>
3<head>
mark.lam@apple.coma931ab22013-09-08 01:18:24 +00004<script src="../resources/js-test-pre.js"></script>
jdiggs@igalia.com25615b92016-05-20 18:34:14 +00005<script src="../resources/accessibility-helper.js"></script>
cfleizach@apple.comb581ef62010-05-05 01:11:03 +00006</head>
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +00007<body id="body">
8
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +00009 <input type="image" alt="Submit" src="resources/cake.png" width=100 height=100 id="image1">
10
cfleizach@apple.comb581ef62010-05-05 01:11:03 +000011 <p id="description"></p>
12 <div id="console"></div>
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +000013
14 <script>
15 if (window.accessibilityController) {
jdiggs@igalia.com25615b92016-05-20 18:34:14 +000016 description("This test makes sure that an input image returns its alt tag as the accessible name");
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +000017
cfleizach@apple.comb581ef62010-05-05 01:11:03 +000018 var image1 = document.getElementById("image1").focus();
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +000019 var img = accessibilityController.focusedElement;
jdiggs@igalia.com25615b92016-05-20 18:34:14 +000020 shouldBeEqualToString("platformValueForW3CName(img)", "Submit");
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +000021 }
22 </script>
cfleizach@apple.comb581ef62010-05-05 01:11:03 +000023
mark.lam@apple.coma931ab22013-09-08 01:18:24 +000024<script src="../resources/js-test-post.js"></script>
cfleizach@apple.comb581ef62010-05-05 01:11:03 +000025
26</body>
cfleizach@apple.com8b20cd12009-02-16 23:19:43 +000027</html>