MDN self-hosted library · e01.org

ARIA: searchbox role

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<div tabindex="0" aria-label="search" role="searchbox" contenteditable></div>
html
<input type="search" />
html
<form role="search">
  <input
    type="search"
    role="searchbox"
    aria-description="search results will appear below"
    id="search"
    value="" />
  <label for="search">Search this site</label>
  <button>Submit search</button>
</form>
<div aria-live="polite" role="region" aria-atomic="true">
  <div class="sr-only"></div>
</div>
<div id="search-results"></div>
html
<input
  type="search"
  aria-description="search results will appear below"
  id="search"
  value="" />