Skip to content
DevMarDe
Crawl Audit check 132Crawl AuditNavigation

Labelling the search box: Crawl Audit check 132

Crawl Audit check 132 warns when a search box has no label or placeholder. Why a placeholder isn't a real label, what WCAG asks, and the markup to use.

Zain Kazmi2 min read
On this page
Check
132 of 200
Module
UX & Conversion (CRO)
Group
Interactive Navigation & Layout Usability
Impact
Low

Short answer: a search box needs a name that screen readers can announce, such as "Search the shop". Check 132 warns when a search box has neither a placeholder nor an aria-label. Passing it with a placeholder alone isn't enough for accessibility, so use a real label.

What Crawl Audit checks

  • Pass: a search input with a placeholder or an aria-label.
  • Warning: a search input with neither.
  • Pass: no search box on the page.

What the standards say

  • WCAG 3.3.2 Labels or Instructions (level A): "Labels or instructions are provided when content requires user input."
  • The W3C's forms tutorial: "placeholder text is not a replacement for labels. Assistive technologies, such as screen readers, do not treat placeholder text as labels."
  • MDN, on search inputs: "Avoid using the placeholder attribute if you can." Placeholder text also disappears as soon as someone types.

The markup

<search>
  <form action="/search">
    <label for="q">Search articles</label>
    <input id="q" name="q" type="search">
    <button>Search</button>
  </form>
</search>

If the design has no room for visible label text, an aria-label="Search articles" on the input gives screen readers a name. A visible label is still better for everyone else.

Sources

All 200 Crawl Audit checks

See how your site does on every check.

Crawl Audit runs this check and 199 others on your domain. The full report is $7.89, one time. The free check on this site covers 25.