When a Search Field Has No Label, It Doesn’t Exist for Screen Reader Users

Dupixent website with JAWS speech history showing a search input field announcing only "Type in text" and "Edit" with no label identifying it as a search field.
<label for="search-field">Search</label><input id="search-field" type="text" />
<label for="search-field" class="visually-hidden">Search</label><input id="search-field" type="text" />
<input type="text" aria-label="Search" />
<span id="search-text">Search</span><input type="text" aria-labelledby="search-text" />

    Why does a search field need a proper label?

    A label gives the input field a clear purpose. Without it, screen readers only announce “edit,” leaving users without context about what the field is for.

    Isn’t placeholder text enough for accessibility?

    No, placeholder text is not a reliable label. It disappears when typing begins and may not be properly announced by assistive technologies.

    How does an unlabeled search field affect users?

    Users may not recognize the field as a search function, making it harder to find information and increasing confusion and navigation time.

    How can developers fix an unlabeled search field?

    Add a properly associated <label>, use a visually hidden label if needed, or apply ARIA attributes like aria-label to provide a clear accessible name.