Why this wireframe works | Icon toggle search
Search stays available in a tidy header
A magnifier button stands in for the input field, leaving the header width for the menu. The field opens only when wanted, so the everyday header looks clean.
The word “Search” beside the icon
Some readers do not recognize a magnifier alone as search. On desktop the word “Search” sits beside the icon, saying what pressing it does.
Ready to type as soon as it opens
Pressing the button opens the search field and moves focus to the input automatically, saving the extra press on the field.
The open or closed state reaches screen readers
The button carries aria-expanded to convey whether the field is open. Closing with the close button or Esc returns focus to the original button.
Common mistakes | Icon toggle search
An icon-only button with no name
A button with only a magnifier image is announced as just “button”. Even without visible text, name it with aria-label=”Search” or similar.
Focus not moved to the input on opening
If the field opens but the input is not focused, readers have to press again. Move focus to the input on opening so they can type at once.
No obvious way to close
With no close button after opening, readers are unsure how to get back. Add a close button and let the Esc key close it too.
An open field that hides the content
A field opened over the content hides what was being read. Insert it as a row under the header, or restore the original position on closing.
FAQ | Icon toggle search
Open under the header, or full screen?
For typing alone, opening under the header is enough. To show popular terms or suggestions alongside, opening full screen suits better.
Can the same layout be used on mobile?
Keeping the same layout means the way to search does not change between desktop and mobile. On mobile use the icon alone and keep the pressable area about 44px tall.
Can the search button sit next to the menu button?
Yes. Use different icons and name each so readers can tell the menu button from the search button.






