| 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="img-ignored" alt="" height="100" width="100"> | |
| 9 <img id="img1" title="test1" height="100" width="100"> | 8 <img id="img1" title="test1" height="100" width="100"> |
| 10 <img id="img2" alt="alt" title="test2" height="100" width="100"> | 9 <img id="img2" alt="alt" title="test2" height="100" width="100"> |
| 11 <div id="img3" role="img" title="test3" width="100" height="100">test</div> | 10 <div id="img3" role="img" title="test3" width="100" height="100">test</div> |
| 12 <div id="img4" role="img" alt="alt" title="test4" width="100" height="100">t
est</div> | 11 <div id="img4" role="img" alt="alt" title="test4" width="100" height="100">t
est</div> |
| 13 | 12 |
| 14 <p id="description"></p> | 13 <p id="description"></p> |
| 15 <div id="console"></div> | 14 <div id="console"></div> |
| 16 | 15 |
| 17 <script> | 16 <script> |
| 18 | 17 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 34 | 33 |
| 35 // Now do the same checks for ARIA type images. | 34 // Now do the same checks for ARIA type images. |
| 36 var image3 = accessibilityController.accessibleElementById("img3"); | 35 var image3 = accessibilityController.accessibleElementById("img3"); |
| 37 debug("Image3 name: " + image3.name); | 36 debug("Image3 name: " + image3.name); |
| 38 debug("Image3 description: " + image3.description + "<br>"); | 37 debug("Image3 description: " + image3.description + "<br>"); |
| 39 | 38 |
| 40 // Now do the same checks for ARIA type images. | 39 // Now do the same checks for ARIA type images. |
| 41 var image4 = accessibilityController.accessibleElementById("img4"); | 40 var image4 = accessibilityController.accessibleElementById("img4"); |
| 42 debug("Image4 name: " + image4.name); | 41 debug("Image4 name: " + image4.name); |
| 43 debug("Image4 description: " + image4.description + "<br>"); | 42 debug("Image4 description: " + image4.description + "<br>"); |
| 44 | |
| 45 // Verify that the first image (with an empty alt tag) is ignored | |
| 46 shouldBe("accessibilityController.accessibleElementById('img-ignored')",
"undefined"); | |
| 47 } | 43 } |
| 48 | 44 |
| 49 </script> | 45 </script> |
| 50 | 46 |
| 51 </body> | 47 </body> |
| 52 </html> | 48 </html> |
| OLD | NEW |