Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / presentation-owned-elements.html
blob9587919a553606b1818801215bb9ec2b99e4f377
1 <script src="../resources/js-test.js"></script>
2 <script src="../resources/accessibility-helper.js"></script>
3 <div>These lists have a static text role because they have a presentation role.</div>
4 <ul role="presentation">
5 <li>Presentation Item 1</li>
6 <li>Presentation Item 2</li>
7 </ul>
9 <div>The first list item has a listitem role even if ul has a presentation role because it has an explicit role.</div>
10 <ul role="presentation">
11 <li role="listitem">Explicit Item 1</li>
12 <li>Implicit Item 2</li>
13 </ul>
15 <div>These two tables have static text roles because they have presentation roles.</div>
16 <table role="presentation">
17 <thead>
18 <tr>
19 <th>Presentation th</th>
20 </tr>
21 </thead>
22 <tbody>
23 <tr>
24 <td>Presentation th</td>
25 </tr>
26 </tbody>
27 </table>
29 <table role="presentation">
30 <tr>
31 <th>Presentation th</th>
32 </tr>
33 </table>
35 <div>The "Presentation th" has a static text role because it has a presentation role.</div>
36 <table>
37 <tr role="presentation">
38 <th>Presentation th</th>
39 </tr>
40 <tr>
41 <td>Normal td</td>
42 </tr>
43 </table>
45 <div>The row for "Explicit th" has a row role even if table has a presentation role because it has an explicit role.</div>
46 <table role="presentation">
47 <tr role="row">
48 <th>Explicit th</th>
49 </tr>
50 <tr>
51 <td>Implicit td</td>
52 </tr>
53 </table>
55 <div>The menu items except button have a static text role because it has a presentation role and is disabled.<br>
56 Button has a button role because it has an explicit role.</div>
57 <menu type="context" role="presentation">
58 <input type="checkbox" name="vehicle" value="Bike" disabled> I have a bike
59 <input type="button" role="button" value="Click me" disabled>
60 <input type="radio" name="gender" value="male" disabled> Male
61 <input type="radio" name="gender" value="female" disabled> Female
62 </menu>
64 <div>The option A has a static text role because it has a presentation role and is disabled.<br>
65 The option B has option role because it has an explicit role.</div>
66 <select multiple role="presentation" disabled>
67 <option value="A" disabled>A</option>
68 <option value="B" disabled role="option">B</option>
69 </select>
71 <p>End of test</p>
72 <p id="description"></p>
73 <div id="console"></div>
74 <script>
75 description("This test make sure that presentation role is inherited to required owned elements.");
77 if (window.testRunner)
78 testRunner.dumpAsText();
79 if (window.accessibilityController) {
80 buildAccessibilityTree(accessibilityController.focusedElement, 0, 1);
82 </script>