References

Beginner-friendly references for web development, with live, editable examples.

The HTML aria-placeholder attribute

ARIA Accessibility All modern browsers Updated
Quick answer

The aria-placeholder attribute provides short hint text for an empty custom textbox. Prefer the native placeholder attribute on real inputs; use aria-placeholder only on custom role="textbox" widgets.

Overview

The aria-placeholder attribute provides a short hint shown in an empty input to help the user enter data.

It supplies a hint for a custom input or combobox. A native <input>'s placeholder attribute already provides this for real form fields, so reach for the ARIA version only on a custom widget that is not a true input.

Like all ARIA, aria-placeholder changes only the accessibility tree — what assistive technology perceives — never the element's behavior or appearance. The first rule of ARIA applies: if a native HTML element or attribute conveys this, use that instead, and only reach for ARIA when nothing native fits.

Syntax

<div role="textbox" contenteditable="true" aria-placeholder="Search…"></div>

Values

Value
A string.

Example

Live example
<div role="textbox" contenteditable="true" aria-placeholder="Type a message" aria-label="Message"></div>

Best practices

  • Follow the first rule of ARIA — use a native HTML element or attribute that conveys this where one exists, rather than adding ARIA.
  • On a real form field, use the native <input> placeholder attribute instead.
  • Never use a placeholder as the only label — pair it with a real <label>.
  • Keep the hint short and treat it as supplementary, not essential.

Frequently asked questions

What does aria-placeholder do?
A short hint shown in an empty input to help the user enter data.
When should I use aria-placeholder instead of the placeholder attribute?
Only on a custom input or combobox that is not a real <input>. Native fields should use the placeholder attribute.
Is a placeholder a substitute for a label?
No. It disappears on input and is not a reliable accessible name. Always provide a <label>.
Do I need aria-placeholder if native HTML already conveys it?
Usually not. ARIA is for what native HTML cannot express; redundant or incorrect ARIA can make accessibility worse. Reach for it only when no native element fits.