files/en-us/web/api/element/ariaautocomplete/index.md
{{APIRef("DOM")}}
The ariaAutoComplete property of the {{domxref("Element")}} interface reflects the value of the aria-autocomplete attribute, which indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made.
A string with one of the following values:
"inline"
"list"
"both"
"none"
In this example, the aria-autocomplete attribute on the element with an ID of animal is set to "inline". Using ariaAutoComplete we update the value to "list", which is the expected value for a combobox that invokes a listbox popup.
<div class="animals-combobox">
<label for="animal">Animal</label>
<input
id="animal"
type="text"
role="combobox"
aria-autocomplete="inline"
aria-controls="animals-listbox"
aria-expanded="false"
aria-haspopup="listbox" />
<ul id="animals-listbox" role="listbox" aria-label="Animals">
<li id="animal-cat" role="option">Cat</li>
<li id="animal-dog" role="option">Dog</li>
</ul>
</div>
let el = document.getElementById("animal");
console.log(el.ariaAutoComplete); // inline
el.ariaAutoComplete = "list";
console.log(el.ariaAutoComplete); // list
{{Specifications}}
{{Compat}}