cfleizach@apple.com | a938065 | 2008-07-22 21:45:53 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <script> |
rniwa@webkit.org | 3526ecc3 | 2012-06-12 20:37:15 +0000 | [diff] [blame] | 3 | if (window.testRunner) |
| 4 | testRunner.dumpAsText(); |
cfleizach@apple.com | a938065 | 2008-07-22 21:45:53 +0000 | [diff] [blame] | 5 | </script> |
| 6 | <body> |
| 7 | |
| 8 | <div id="result"></div> |
| 9 | |
| 10 | <!-- Test internally named linked anchors --> |
| 11 | <li class="toclevel-2"><a href="#Tourette_syndrome" id="tourette_anchor"><span class="tocnumber">2.2</span> <span class="toctext">Tourette syndrome</span></a></li> |
| 12 | <p><a name="Tourette_syndrome" id="Tourette_syndrome"></a></p> |
| 13 | <h3><span class="editsection">[<a href="/w/index.php?title=Samuel_Johnson&action=edit&section=11" title="Edit section: Tourette syndrome">edit</a>]</span> <span class="mw-headline">Tourette syndrome</span></h3> |
| 14 | |
| 15 | <A HREF="#bottom" id="bottom_anchor">Link to anchor</A> <A HREF="#bottom2" id="bottom2_anchor">Link to div</A> |
| 16 | <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> |
| 17 | <BR><BR><BR><BR><BR>This is some text in the middle<BR><BR><BR><BR><BR> |
| 18 | <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> |
| 19 | This is some text. |
| 20 | This is a bottom anchor<a id="bottom"></A> |
| 21 | <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> |
| 22 | <DIV ID="bottom2">This is a div</DIV> |
| 23 | |
| 24 | |
| 25 | <script> |
| 26 | if (window.accessibilityController) { |
| 27 | var result = document.getElementById("result"); |
| 28 | result.innerText += "Anchor Tests\n"; |
| 29 | result.innerText += "----------------------\n"; |
| 30 | |
| 31 | var labeledItem = document.getElementById("tourette_anchor"); |
| 32 | labeledItem.focus(); |
| 33 | result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| 34 | |
| 35 | labeledItem = document.getElementById("bottom_anchor"); |
| 36 | labeledItem.focus(); |
| 37 | result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| 38 | |
| 39 | labeledItem = document.getElementById("bottom2_anchor"); |
| 40 | labeledItem.focus(); |
| 41 | result.innerText += accessibilityController.focusedElement.attributesOfLinkedUIElements() + "\n\n"; |
| 42 | } |
| 43 | </script> |
| 44 | </body> |
| 45 | </html> |