blob: d29e25fa256dcfcf5b16a297f386b0ca5a5d6c95 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<div>
<label>
Websites <input id="input1" type="text" list="datalist1" />
</label>
<datalist id="datalist1">
<option value="https://www.apple.com/" label="Apple">Apple</option>
<option value="https://www.wikipedia.com/" label="Wikipedia">Wikipedia</option>
</datalist>
</div>
<div>
<input id="input2" type="search" placeholder="Fruits" list="fruits" />
<datalist id="fruits">
<select>
<option>Apple</option>
<option>Apricot</option>
<option>Banana</option>
<option>Cantaloupe</option>
<option>Durian</option>
<option>Grape</option>
<option>Guava</option>
<option>Orange</option>
<option>Mango</option>
<option>Pear</option>
<option>Watermelon</option>
<option></option>
<option disabled>Foo</option>
</select>
</datalist>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that an input field with a datalist is conveyed as listbox popup.");
if (window.accessibilityController) {
document.getElementById("input1").focus();
var axInput = accessibilityController.focusedElement;
shouldBe("axInput.popupValue", "'listbox'");
document.getElementById("input2").focus();
axInput = accessibilityController.focusedElement;
shouldBe("axInput.popupValue", "'listbox'");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>