Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / aria-labelledby-stay-within.html
blobf17a6845bc08b6ee79858dc2f48e7e75773638a9
1 <html>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5 </script>
6 <body>
8 <!-- this test makes sure that the labeled by aria attributes does not start climbing out of itself and
9 appending on other elements as its own description -->
11 <p>Some <a href="#">focusable content</a> before the application widgets.</p>
12 <ul role="toolbar">
13 <li><a role="button" href="#" id="get"><span>Get New Mail</span></a></li>
14 <li><a role="button" href="#" id="com"><span>Compose New Message</span></a></li>
15 <li><a role="button" href="#" id="rep" aria-labelledby="rep item5"><span>Reply</span></a></li>
16 <li><a role="button" href="#" id="all" aria-labelledby="all item5"><span>Reply All</span></a></li>
17 <li><a role="button" href="#" id="for" aria-labelledby="for item5"><span>Forward</span></a></li>
18 <li><a role="button" href="#" id="del" aria-labelledby="del item5"><span>Delete</span></a></li>
19 </ul>
21 <ul role="listbox">
22 <li id="item4" role="listitem" tabindex="-1" class="">Item Four</li>
23 <li id="item5" role="listitem" tabindex="-1" class="">Item Five</li>
24 <li id="item6" role="listitem" tabindex="0" class="selected" aria-selected="true">Item Six</li>
25 <li id="item7" role="listitem" tabindex="-1">Item Seven</li>
26 </ul>
28 <div id="result"></div>
30 <script>
31 if (window.accessibilityController) {
32 var labeledItem = document.getElementById("rep");
33 labeledItem.focus();
34 var result = document.getElementById("result");
35 if ( accessibilityController.focusedElement.deprecatedDescription == "AXDescription: Reply Item Five" ) {
36 result.innerText = "Passed";
38 else {
39 result.innerText = "Failed. Result ==" + accessibilityController.focusedElement.deprecatedDescription + "==";
42 </script>
43 </body>
44 </html>