cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 1 | <html> |
cfleizach@apple.com | b581ef6 | 2010-05-05 01:11:03 +0000 | [diff] [blame] | 2 | <html> |
| 3 | <head> |
mark.lam@apple.com | a931ab2 | 2013-09-08 01:18:24 +0000 | [diff] [blame] | 4 | <script src="../resources/js-test-pre.js"></script> |
jdiggs@igalia.com | 25615b9 | 2016-05-20 18:34:14 +0000 | [diff] [blame] | 5 | <script src="../resources/accessibility-helper.js"></script> |
cfleizach@apple.com | b581ef6 | 2010-05-05 01:11:03 +0000 | [diff] [blame] | 6 | </head> |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 7 | <body id="body"> |
| 8 | |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 9 | <input type="image" alt="Submit" src="resources/cake.png" width=100 height=100 id="image1"> |
| 10 | |
cfleizach@apple.com | b581ef6 | 2010-05-05 01:11:03 +0000 | [diff] [blame] | 11 | <p id="description"></p> |
| 12 | <div id="console"></div> |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 13 | |
| 14 | <script> |
| 15 | if (window.accessibilityController) { |
jdiggs@igalia.com | 25615b9 | 2016-05-20 18:34:14 +0000 | [diff] [blame] | 16 | description("This test makes sure that an input image returns its alt tag as the accessible name"); |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 17 | |
cfleizach@apple.com | b581ef6 | 2010-05-05 01:11:03 +0000 | [diff] [blame] | 18 | var image1 = document.getElementById("image1").focus(); |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 19 | var img = accessibilityController.focusedElement; |
jdiggs@igalia.com | 25615b9 | 2016-05-20 18:34:14 +0000 | [diff] [blame] | 20 | shouldBeEqualToString("platformValueForW3CName(img)", "Submit"); |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 21 | } |
| 22 | </script> |
cfleizach@apple.com | b581ef6 | 2010-05-05 01:11:03 +0000 | [diff] [blame] | 23 | |
mark.lam@apple.com | a931ab2 | 2013-09-08 01:18:24 +0000 | [diff] [blame] | 24 | <script src="../resources/js-test-post.js"></script> |
cfleizach@apple.com | b581ef6 | 2010-05-05 01:11:03 +0000 | [diff] [blame] | 25 | |
| 26 | </body> |
cfleizach@apple.com | 8b20cd1 | 2009-02-16 23:19:43 +0000 | [diff] [blame] | 27 | </html> |