[go: nahoru, domu]

blob: 5659177b904c765c30c687a5b5945c3ed0183720 [file] [log] [blame]
<script src="../resources/js-test.js"></script>
<script src="../resources/accessibility-helper.js"></script>
<div id="container">
<div>These lists have a static text role because they have a presentation role.</div>
<ul role="presentation">
<li>Presentation Item 1</li>
<li>Presentation Item 2</li>
</ul>
<div>The first list item has a listitem role even if ul has a presentation role because it has an explicit role.</div>
<ul role="presentation">
<li role="listitem">Explicit Item 1</li>
<li>Implicit Item 2</li>
</ul>
<div>These two tables have static text roles because they have presentation roles.</div>
<table role="presentation">
<thead>
<tr>
<th>Presentation th</th>
</tr>
</thead>
<tbody>
<tr>
<td>Presentation th</td>
</tr>
</tbody>
</table>
<table role="presentation">
<tr>
<th>Presentation th</th>
</tr>
</table>
<div>The "Presentation th" has a static text role because it has a presentation role.</div>
<table>
<tr role="presentation">
<th>Presentation th</th>
</tr>
<tr>
<td>Normal td</td>
</tr>
</table>
<div>The row for "Explicit th" has a row role even if table has a presentation role because it has an explicit role.</div>
<table role="presentation">
<tr role="row">
<th>Explicit th</th>
</tr>
<tr>
<td>Implicit td</td>
</tr>
</table>
<div>The menu items except button have a static text role because it has a presentation role and is disabled.<br>
Button has a button role because it has an explicit role.</div>
<menu type="toolbar" role="presentation">
<input type="checkbox" name="vehicle" value="Bike" disabled> I have a bike
<input type="button" role="button" value="Click me" disabled>
<input type="radio" name="gender" value="male" disabled> Male
<input type="radio" name="gender" value="female" disabled> Female
</menu>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test makes sure that presentation role is inherited to required owned elements.");
if (window.testRunner)
testRunner.dumpAsText();
if (window.accessibilityController) {
// Ensure we've seen all nodes in accessibility tree.
traverseAccessibilityTree(accessibilityController.rootElement);
buildAccessibilityTree(accessibilityController.accessibleElementById('container'), 0, 1);
}
</script>