OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 | 5 |
6 <style> | 6 <style> |
7 button { | 7 button { |
8 padding: 30px; | 8 padding: 30px; |
9 } | 9 } |
10 </style> | 10 </style> |
11 | 11 |
12 <button id="cake">Button with image of <img alt="cake" src="resources/cake.png"
width="40px"></button> | 12 <button id="cake">Button with image of <img alt="cake" src="resources/cake.png"
width="40px"></button> |
13 | 13 |
14 <div id="console"></div> | 14 <div id="console"></div> |
15 <script> | 15 <script> |
16 description("This test makes sure that a generic focusable div can get accessibi
lity focus and gets its accessible text from contents.."); | 16 description("This test makes sure that a generic focusable div can get accessibi
lity focus and gets its accessible text from contents.."); |
17 | 17 |
18 if (window.testRunner && window.accessibilityController) { | 18 if (window.testRunner && window.accessibilityController) { |
19 window.testRunner.dumpAsText(); | 19 window.testRunner.dumpAsText(); |
20 | 20 |
21 var button = document.getElementById('cake'); | 21 var button = document.getElementById('cake'); |
22 button.focus(); | 22 button.focus(); |
23 shouldBe("document.activeElement == button", "true"); | 23 shouldBe("document.activeElement == button", "true"); |
24 window.axButton = accessibilityController.focusedElement; | 24 window.axButton = accessibilityController.focusedElement; |
25 shouldBe("axButton.deprecatedTitle.indexOf('Button with image of cake') >= 0
", "true"); | 25 shouldBe("axButton.name.indexOf('Button with image of cake') >= 0", "true"); |
26 } | 26 } |
27 | 27 |
28 </script> | 28 </script> |
29 | 29 |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |