blob: a9af7472f798170a97a1b051fccc9b6a6f0d92e8 [file] [log] [blame]
<!DOCTYPE HTML>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<input role="combobox" type="search" aria-expanded="false" aria-haspopup="true"
aria-autocomplete="list" aria-activedescendant="" aria-owns="list">
<ul id="list" role="listbox">
<li id="option1" role="option">Apple</li>
<li id="option2" role="option">Orange</li>
<li id="option3" role="option">Banana</li>
</ul>
<script>
function axElementById(id) {
return accessibilityController.accessibleElementById(id);
}
test(function(t) {
document.querySelector('input').focus();
var combo_box = document.querySelector('input');
combo_box.setAttribute('aria-expanded', 'true');
combo_box.setAttribute('aria-activedescendant', 'option1');
var option1 = axElementById('option1');
assert_equals(option1.isFocusable, true);
}, "An option with an activedescendant aria-owns parent is focusable");
</script>