|
Lines 1-67
a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html_sec1
|
| 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 |
<p>Simple paragraph</p> |
| 13 |
<p role="grid">A paragraph pretending to be a table</p> |
| 14 |
|
| 15 |
<label>A label</label> |
| 16 |
<label role="heading">Who said label? It's a heading!</label> |
| 17 |
|
| 18 |
<form>A form with a button <button name="button" value="Button">Click me!</button></form> |
| 19 |
<form role="button">Just a button <button name="button" value="Button">Click me!</button></form> |
| 20 |
|
| 21 |
<div>Just some text inside a div</form> |
| 22 |
<div role="textbox">This div is contains a textbox (an entry)</div> |
| 23 |
|
| 24 |
<p id="description"></p> |
| 25 |
<div id="console"></div> |
| 26 |
<script> |
| 27 |
description("This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements"); |
| 28 |
|
| 29 |
if (window.layoutController) { |
| 30 |
layoutTestController.dumpAsText(); |
| 31 |
} |
| 32 |
|
| 33 |
if (window.accessibilityController) { |
| 34 |
document.getElementById("body").focus(); |
| 35 |
var webArea = accessibilityController.focusedElement; |
| 36 |
|
| 37 |
// Paragraphs |
| 38 |
var element = webArea.childAtIndex(0); |
| 39 |
shouldBe("element.role", "'AXRole: paragraph'"); |
| 40 |
element = webArea.childAtIndex(1); |
| 41 |
shouldBe("element.role", "'AXRole: table'"); |
| 42 |
|
| 43 |
// Labels are exposed as inside a panel |
| 44 |
var labelsPanel = webArea.childAtIndex(2); |
| 45 |
element = labelsPanel.childAtIndex(0); |
| 46 |
shouldBe("element.role", "'AXRole: label'"); |
| 47 |
element = labelsPanel.childAtIndex(1); |
| 48 |
shouldBe("element.role", "'AXRole: heading'"); |
| 49 |
|
| 50 |
// Forms |
| 51 |
element = webArea.childAtIndex(3); |
| 52 |
shouldBe("element.role", "'AXRole: form'"); |
| 53 |
element = webArea.childAtIndex(4); |
| 54 |
shouldBe("element.role", "'AXRole: push button'"); |
| 55 |
|
| 56 |
// Divs |
| 57 |
element = webArea.childAtIndex(5); |
| 58 |
shouldBe("element.role", "'AXRole: panel'"); |
| 59 |
element = webArea.childAtIndex(6); |
| 60 |
shouldBe("element.role", "'AXRole: entry'"); |
| 61 |
} |
| 62 |
|
| 63 |
successfullyParsed = true; |
| 64 |
</script> |
| 65 |
<script src="../../../fast/js/resources/js-test-post.js"></script> |
| 66 |
</body> |
| 67 |
</html> |