Source/WebCore: VoiceOver cannot navigate the iTunes album view table
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / aria-grid-with-strange-hierarchy.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
5 <script>
6 var successfullyParsed = false;
7 </script>
8 <script src="../../../fast/js/resources/js-test-pre.js"></script>
9 </head>
10 <body id="body">
11
12 <div tabindex=0 id="grid" role="grid" aria-readonly="true">
13 <div  role="presentation">
14   <table role="presentation">
15           <thead>
16             <tr>
17                  <th role="columnheader" aria-sort="ascending">&nbsp;</th>
18                  <th role="columnheader">Name</th>
19                  <th role="columnheader">Time</th>
20                  <th role="columnheader">Popularity</th>
21                  <th role="columnheader"> Price</th>
22             </tr>
23           </thead>
24      
25     <tbody>
26     <tr role="row">
27         <td role="gridcell">
28           <span class="index"><span>1</span></span>
29         </td>
30         <td role="gridcell"">
31           <span><span>Test</span></span>
32         </td>
33         <td role="gridcell"">
34           <span><span>Test</span></span>
35         </td>
36         <td role="gridcell"">
37           <span><span>Test</span></span>
38         </td>
39     </tr>   
40 </table></div></div>
41 <p id="description"></p>
42 <div id="console"></div>
43
44 <script>
45
46     description("This tests that an ARIA grid with a hierarchy that ignores render elements in between will still expose the correct elements.");
47
48     if (window.accessibilityController) {
49
50           // this text field should be required.
51           document.getElementById("grid").focus();
52           var grid = accessibilityController.focusedElement;
53
54           shouldBe("grid.childrenCount", "6");
55           shouldBe("grid.childAtIndex(0).role", "'AXRole: AXRow'");
56           shouldBe("grid.childAtIndex(1).role", "'AXRole: AXColumn'");
57
58           shouldBe("grid.childAtIndex(0).childrenCount", "4");
59           shouldBe("grid.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXCell'");
60
61           shouldBe("grid.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXCell'");
62           shouldBe("grid.childAtIndex(0).childAtIndex(0).childAtIndex(0).role", "'AXRole: AXStaticText'");
63           shouldBe("grid.childAtIndex(0).childAtIndex(0).childAtIndex(0).stringValue", "'AXValue: 1'");
64
65     }
66     successfullyParsed = true;
67 </script>
68
69 <script src="../../../fast/js/resources/js-test-post.js"></script>
70 </body>
71 </html>