ARIA Widget Roles

ARIA role: searchbox

Build a form with the HTML form generator

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

NameTypeDescription
roletokenExplicit role token searchbox; use only where allowed. Omit when native semantics match.
aria-requiredbooleanRelevant 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">
HTML Reference