HTML Validation
HTML Guides for searchbox
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
The role="searchbox" attribute is redundant on an <input type="search"> without a list attribute and should be removed.
According to the HTML and ARIA specifications, an <input> element with type="search" is already recognized by assistive technologies as a search box. Adding role="searchbox" does not provide additional meaning and is considered unnecessary and potentially confusing by validators.
Incorrect usage:
<input type="search" role="searchbox" placeholder="Search...">
Correct usage:
<input type="search" placeholder="Search...">
Ready to validate your sites?
Start your free trial today.