blob: 2c959852dc26a678b81312cbfc5a4eed9800bc81 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body>
<div role="listbox" id="listbox">
<div role="option">option 1</div>
<div role="option" aria-label="label 2">option 2</div>
</div>
<script>
description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
if (window.accessibilityController) {
let output = "";
let listBox = accessibilityController.accessibleElementById("listbox");
var firstChild = listBox.childAtIndex(0);
var secondChild = listBox.childAtIndex(1);
output += `firstChild.role is ${firstChild.role}\n`;
output += `firstChild.title is ${firstChild.title}\n`;
output += `secondChild.role is ${secondChild.role}\n`;
if (accessibilityController.platformName == "atspi")
output += `secondChild.title is ${secondChild.title}\n`;
else
output += `secondChild.description is ${secondChild.description}\n`;
debug(output);
shouldBe("firstChild.childrenCount", "0");
shouldBe("secondChild.childrenCount", "0");
}
</script>
</body>
</html>