JavaScript Element ariaAutoComplete Property

Beginner
⏱️ 11 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Baseline
Instance property

What You’ll Learn

Element.ariaAutoComplete is an instance property that reflects the aria-autocomplete attribute. Learn the inline, list, both, and none values, how they describe combobox / searchbox / textbox predictions, and how to get or set the property from JavaScript—with five examples and try-it labs.

01

Kind

Instance property

02

Type

String

03

Values

inline · list · both · none

04

Reflects

aria-autocomplete

05

Status

Baseline widely

06

Used on

Combobox / textbox

Introduction

Autocomplete UIs often show a popup list of suggestions, or complete text inline after the caret—or both. Assistive technologies need to know which pattern you use.

That is what aria-autocomplete communicates. The DOM property ariaAutoComplete lets you read and update the same value from JavaScript.

JavaScript
const input = document.getElementById("animal");
console.log(input.ariaAutoComplete); // e.g. "inline"
input.ariaAutoComplete = "list";
💡
Beginner tip

Do not confuse this with the HTML autocomplete attribute (browser autofill). ariaAutoComplete is about ARIA prediction presentation for widgets.

Understanding the Property

MDN: the ariaAutoComplete property of the 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.

  • Reflected attribute — mirrors aria-autocomplete.
  • Get / set — readable and writable string.
  • Four tokensinline, list, both, none.
  • Baseline — widely available since October 2023 (MDN).

📝 Syntax

JavaScript
ariaAutoComplete

Value

A string with one of the following values:

ValueMeaning (MDN)
"inline"Suggested completion text may be inserted dynamically after the caret.
"list"A collection of possible completions may be displayed (for example a listbox).
"both"A collection may be shown; one value is auto-selected and completion text appears after the caret.
"none"No automatic suggestion / prediction UI is presented.

📋 Combobox + Listbox (MDN Shape)

MDN’s example starts with aria-autocomplete="inline", then updates to "list" for a combobox that opens a listbox popup:

JavaScript
<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>

Related attributes often used with comboboxes: aria-controls, aria-expanded, aria-haspopup, and sometimes ariaActiveDescendantElement for the highlighted option.

⚡ Quick Reference

GoalCode / note
Readel.ariaAutoComplete
Listbox popup modeel.ariaAutoComplete = "list"
Inline completionel.ariaAutoComplete = "inline"
List + inlineel.ariaAutoComplete = "both"
No predictionsel.ariaAutoComplete = "none"
MDN statusBaseline Widely available

🔍 At a Glance

Four facts about Element.ariaAutoComplete.

Kind
get / set

Instance

Type
string

4 tokens

Reflects
aria-auto…

complete

Baseline
widely

Oct 2023+

Examples Gallery

Examples follow MDN Element: ariaAutoComplete. Labs use a small combobox input so you can safely read and write the property.

📚 Getting Started

Read the reflected value and follow MDN’s combobox update.

Example 1 — Read ariaAutoComplete

Log the current value from a combobox input.

JavaScript
const el = document.getElementById("animal");
console.log(el.ariaAutoComplete);

// HTML includes: aria-autocomplete="inline"
Try It Yourself

How It Works

The property returns the attribute string. If the attribute is missing, many browsers return null.

Example 2 — MDN Update to "list"

MDN: change from inline completion to listbox popup mode.

JavaScript
let el = document.getElementById("animal");
console.log(el.ariaAutoComplete); // inline
el.ariaAutoComplete = "list";
console.log(el.ariaAutoComplete); // list
Try It Yourself

How It Works

MDN notes "list" is the expected value for a combobox that invokes a listbox popup.

📈 Both, Attribute Sync & Snapshot

Practice other tokens and verify reflection.

Example 3 — Set "both"

Describe list + inline completion together.

JavaScript
const input = document.createElement("input");
input.type = "text";
input.setAttribute("role", "combobox");
document.body.appendChild(input);

input.ariaAutoComplete = "both";
console.log({
  ariaAutoComplete: input.ariaAutoComplete,
  attr: input.getAttribute("aria-autocomplete")
});
Try It Yourself

How It Works

Use "both" only when your UI truly does list suggestions and inline completion text after the caret.

Example 4 — Property vs getAttribute

Confirm the attribute stays in sync after a write.

JavaScript
const el = document.createElement("input");
el.setAttribute("aria-autocomplete", "inline");
document.body.appendChild(el);

el.ariaAutoComplete = "none";
console.log({
  fromProperty: el.ariaAutoComplete,
  fromAttribute: el.getAttribute("aria-autocomplete"),
  same: el.ariaAutoComplete === el.getAttribute("aria-autocomplete")
});
Try It Yourself

How It Works

Prefer ariaAutoComplete in script; keep the attribute for HTML and CSS attribute selectors.

Example 5 — Support Snapshot

Feature-detect and list the allowed tokens.

JavaScript
console.log({
  supported: "ariaAutoComplete" in Element.prototype,
  allowed: ["inline", "list", "both", "none"],
  tip: "Use \"list\" for combobox + listbox popup (MDN)",
  status: "Baseline Widely available (MDN)"
});
Try It Yourself

How It Works

Pick the token that matches the UI you actually build—mismatched values confuse assistive tech users.

🚀 Common Use Cases

  • Combobox widgets with a listbox of suggestions.
  • Search fields that complete text inline after the caret.
  • Switching prediction mode when the UI changes (list vs inline).
  • Keeping script and markup aligned without manual setAttribute.
  • Documenting ARIA autocomplete behavior for accessibility reviews.

🔧 How It Works

1

User types in a combobox / textbox

Your app may compute prediction options.

Input
2

aria-autocomplete describes the UI

inline, list, both, or none.

Declare
3

Assistive tech adapts announcements

Users know whether a list or inline completion is expected.

A11y
4

Keep JS and UI in sync

Update ariaAutoComplete when the prediction pattern changes.

📝 Notes

Browser Support

Element.ariaAutoComplete is Baseline Widely available (MDN: across browsers since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.

Baseline Widely available

Element.ariaAutoComplete

String inline / list / both / none — reflects aria-autocomplete.

Baseline Widely available
Google Chrome Supported (ARIA reflection)
Yes
Microsoft Edge Supported (ARIA reflection)
Yes
Mozilla Firefox Supported (ARIA reflection)
Yes
Apple Safari Supported (ARIA reflection)
Yes
Opera Follow Chromium support
Yes
Internet Explorer No ariaAutoComplete IDL — use setAttribute
No
ariaAutoComplete Baseline

Bottom line: Use ariaAutoComplete to get/set aria-autocomplete. Prefer "list" for combobox + listbox popups. Match the token to the real UI, and do not confuse it with HTML autocomplete autofill.

Conclusion

ariaAutoComplete reflects aria-autocomplete so you can declare how text predictions are presented—inline, list, both, or none. Set it to match your combobox or search UI, and keep related ARIA (controls, expanded, active descendant) consistent.

Continue with ariaBrailleLabel, ariaAtomic, EventTarget, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Match the token to the real prediction UI
  • Use "list" for combobox + listbox popups
  • Wire aria-controls / aria-expanded with the popup
  • Test keyboard and screen-reader behavior
  • Keep HTML autocomplete separate from ARIA autocomplete

❌ Don’t

  • Claim "list" when there is no suggestion list
  • Confuse ARIA autocomplete with browser autofill
  • Forget to update the property if the UI mode changes
  • Skip roles on options / listbox for combobox patterns
  • Rely on autocomplete alone without visible feedback

Key Takeaways

Knowledge Unlocked

Five things to remember about ariaAutoComplete

Reflected aria-autocomplete string for prediction UI.

5
Core concepts
📝 02

Four values

inline list both none

Tokens
🔍 03

Combobox

search / textbox

Use
04

Baseline

widely available

Status
🎯 05

Not autofill

ARIA vs HTML

Clarity

❓ Frequently Asked Questions

It reflects the aria-autocomplete attribute as a string, describing whether typing may show predictions for a combobox, searchbox, or textbox, and how those predictions are presented.
No. MDN marks Element.ariaAutoComplete as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
One of the strings "inline", "list", "both", or "none".
MDN’s example updates from "inline" to "list", noting that "list" is the expected value for a combobox that invokes a listbox popup.
HTML autocomplete (and autofill) is about browser/password-manager form filling. aria-autocomplete / ariaAutoComplete describes ARIA prediction UI for widgets like comboboxes.
Yes. Reading and writing ariaAutoComplete updates the reflected aria-autocomplete attribute.
Did you know?

Many production comboboxes use aria-autocomplete="list" together with aria-expanded toggling when the suggestion popup opens and closes—the autocomplete token describes the prediction pattern; expanded describes the open state.

Next: Element ariaBrailleLabel

Learn the reflected aria-braillelabel property for braille-oriented names.

ariaBrailleLabel →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful