Favorites

HTML aria-placeholder ARIA Attribute

aria-placeholder
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

The aria-placeholder attribute gives a short hint shown in a custom text box while it is empty, such as an example value.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The aria-placeholder attribute defines a short hint for a custom text box, such as a sample value or the expected format. It is the ARIA version of the HTML placeholder attribute and is meant for elements with the textbox or searchbox role built with contenteditable.

You must also show the hint visibly while the field is empty and hide it once the user types, usually with CSS such as :empty::before. Native <input> and <textarea> elements should use placeholder instead.

A placeholder is not a label. It disappears when the user starts typing and often has low contrast, so always give the field a real label too.

Properties

Type
Widget
Value
string
Default
None
Used with
searchbox, textbox

Syntax

<element role="textbox" aria-placeholder="text">

Values

  • textA short hint shown while the text box is empty.

Example

<div id="n">Name</div>
<div role="textbox" contenteditable="true" aria-labelledby="n" aria-placeholder="Jane Smith"
data-ph="Jane Smith" style="border:1px solid #888;padding:4px;width:200px"></div>
<style>[data-ph]:empty::before{content:attr(data-ph);color:#777}</style>

Browser Support

The following information will show you the current browser support for the aria-placeholder ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.

This ARIA attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee