ARIA Widget Roles
ARIA role: searchbox
A text field for a search query. Prefer input type=search with label; searchbox differs from search landmark. The example demonstrates a native equivalent or preferred alternative and deliberately omits redundant ARIA. Explicit roles do not implement visual presentation, interaction or focus management; verify allowed role/element combinations in ARIA in HTML. Accessibility exposure varies with browser, platform and assistive technology. Test relevant combinations; rendering is not proof of accessibility.
Formal Syntax & Structure
html syntaxhtml
role="searchbox"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| role | token | Explicit role token searchbox; use only where allowed. Omit when native semantics match. |
| aria-required | boolean | Relevant when applicable. Communicates that user input is required before submission. It does not enforce validity, so prefer native required where supported and implement validation for custom controls. Provide visible instructions as well. Values: true, false. |
Working Example
Example Snippethtml
<label for="q">Search recipes</label><input id="q" type="search">