Merge "[Release] Webkit2-efl-123997_0.11.51" into tizen_2.1
[framework/web/webkit-efl.git] / LayoutTests / accessibility / aria-labelledby-stay-within.html
1 <html>
2 <script>
3     if (window.testRunner)
4         testRunner.dumpAsText();
5 </script>
6 <body>
7
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 -->
10
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>
20
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>
27
28     <div id="result"></div>
29     
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.description == "AXDescription: Reply Item Five" ) {
36                result.innerText = "Passed";
37             }
38             else { 
39                result.innerText = "Failed. Result ==" + accessibilityController.focusedElement.description + "==";
40             }
41         }
42     </script>
43 </body>
44 </html>