| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| <html> | |
| <head> | |
| <script src="../resources/js-test.js"></script> | |
| </head> | |
| <body id="body"> | |
| <style> | |
| .hidden { | |
| height: 0; | |
| overflow: hidden; | |
| } | |
| </style> | |
| <div class="hidden"> | |
| <h1><a id="hidden-link" tabindex=0 href="http://domain.com/path/i-am-the-URL?id=1234">I am the hidden link text.</a></h1> | |
| </div> | |
| <hr> | |
| <div> | |
| <h1><a id="visible-link" tabindex=0 href="http://domain.com/path/i-am-the-URL?id=1234">I am the visible link text.</a></h1> | |
| </div> | |
| <p id="description"></p> | |
| <div id="console"></div> | |
| <script> | |
| description("This tests that even if an element is not visible, textUnderElement() will still give the text."); | |
| if (window.accessibilityController) { | |
| var hiddenLink = accessibilityController.accessibleElementById("hidden-link"); | |
| shouldBe("hiddenLink.title", "'AXTitle: I am the hidden link text.'"); | |
| var visibleLink = accessibilityController.accessibleElementById("visible-link"); | |
| shouldBe("visibleLink.title", "'AXTitle: I am the visible link text.'"); | |
| } | |
| </script> | |
| </body> | |
| </html> |