ARIA searchbox Role
The searchbox role marks a text field used for entering search terms. An input with type search has this role.
Description
The searchbox role is a type of textbox intended for entering a search query. Screen readers announce it as a search field. The <input type="search"> element has this role, unless it has a list attribute, in which case it is a combobox.
Don't confuse it with the search landmark, which goes on the area or form containing the search field. Usually you use both: a <search> element (or role="search" on the form) wrapping an <input type="search">. If the field shows suggestions as the user types, make it a combobox instead.
Use the native HTML <input> element where you can: it already has the searchbox role, with the expected keyboard and browser behavior built in.
Properties
- Category
- Widget
- HTML equivalent
<input>- Accessible name from
- author
- Required parent role
- None
- Required child roles
- None
ARIA Attributes
- Required
- None
- Supported
aria-activedescendant,aria-autocomplete,aria-errormessage,aria-invalid,aria-multiline,aria-placeholder,aria-readonly,aria-required- Prohibited
- None
- Global
- All global ARIA attributes can also be used, such as
aria-label,aria-labelledby,aria-describedby,aria-hidden.
Syntax
<element role="searchbox">
Example
Browser Support
The following information will show you the current browser support for the searchbox ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





