| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body id="body"> | 6 <body id="body"> |
| 7 | 7 |
| 8 <img id="realimage" tabindex="0" alt="TestImage" width="100" height="100"> | 8 <img id="realimage" tabindex="0" alt="TestImage" width="100" height="100"> |
| 9 | 9 |
| 10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k"> | 10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k"> |
| 11 | 11 |
| 12 <image tabindex="0" id="svgimage" alt="TestImage" x="20" y="20" width="298" heig
ht="65" xlink:href="resources/cake.png"/> | 12 <image tabindex="0" id="svgimage" alt="TestImage" x="20" y="20" width="298" heig
ht="65" xlink:href="resources/cake.png"/> |
| 13 | 13 |
| 14 </svg> | 14 </svg> |
| 15 | 15 |
| 16 <p id="description"></p> | 16 <p id="description"></p> |
| 17 <div id="console"></div> | 17 <div id="console"></div> |
| 18 | 18 |
| 19 <script> | 19 <script> |
| 20 | 20 |
| 21 description("This tests that SVG images are accessible elements and they hav
e the same attributes as real images."); | 21 description("This tests that SVG images are accessible elements and they hav
e the same attributes as real images."); |
| 22 | 22 |
| 23 if (window.accessibilityController) { | 23 if (window.accessibilityController) { |
| 24 document.getElementById("realimage").focus(); | 24 document.getElementById("realimage").focus(); |
| 25 var realImage = accessibilityController.focusedElement; | 25 var realImage = accessibilityController.focusedElement; |
| 26 | 26 |
| 27 document.getElementById("svgimage").focus(); | 27 document.getElementById("svgimage").focus(); |
| 28 var svgImage = accessibilityController.focusedElement; | 28 var svgImage = accessibilityController.focusedElement; |
| 29 shouldBe("svgImage.role", "realImage.role"); | 29 shouldBe("svgImage.role", "realImage.role"); |
| 30 shouldBe("svgImage.description", "realImage.description"); | 30 shouldBe("svgImage.deprecatedDescription", "realImage.deprecatedDescript
ion"); |
| 31 | 31 |
| 32 debug("SVG Image Role: " + svgImage.role); | 32 debug("SVG Image Role: " + svgImage.role); |
| 33 debug("SVG Image Description: " + svgImage.description); | 33 debug("SVG Image Description: " + svgImage.deprecatedDescription); |
| 34 } | 34 } |
| 35 | 35 |
| 36 </script> | 36 </script> |
| 37 | 37 |
| 38 </body> | 38 </body> |
| 39 </html> | 39 </html> |
| OLD | NEW |