Web Design & UI/UX9 min read

Why Your Search Looks Junior: 6 Search UX Fixes

Six search UX fixes that make a search bar feel senior: recent searches, suggestions as people type, typo recovery, a useful no results screen, filters after the search and a visible scope. Each built side by side, with the code.

By Boone
XLinkedIn
Why Your Search Looks Junior: 6 Search UX Fixes

A junior search is a box that waits for a perfectly typed query. A senior search helps before the first letter, while people type and after something goes wrong. Below are six fixes, each rebuilt side by side on small invented screens, with the values and the code.

1. Show recent searches

Junior

A recipe search screen with the cursor in an empty search field and nothing but white space below it

Senior

The same empty field with a Recent list under it: chicken soup, banana bread, lentil curry, overnight oats and quick pasta, with a Clear action

The junior screen opens a keyboard and then offers nothing. The senior one already holds five past searches, so a repeat search is one tap instead of retyping it.

When someone is repeating a search, the empty focused field is the best place to meet them. You rarely need to build it from nothing: Algolia's Autocomplete library has a recent searches plugin with a limit you set, and an option to open the panel on focus before anything is typed.

Keep the list short and give it a way out. We stop at five rows so the list stays short above a phone keyboard, and a Clear action matters on a shared device. Mark each row with a clock, so history never looks like a recommendation.

2. Suggest as they type

Junior

A search field holding the letters chi with only the line Press Search to see results under it

Senior

The same field with five suggestions: chicken soup, chicken curry, chili with beans, chickpea salad and chicken fried rice, each with the untyped part in bold

Three letters in, the junior screen asks for more work. The senior one offers five complete queries, and the bold endings show at a glance how they differ.

NN/g calls search suggestions an expected sign of a well designed search feature. Its styling advice is specific: when suggestions only add characters to the end of what someone typed, highlight the added characters. If your suggestions match the typed text anywhere in the phrase, highlight the typed text instead.

Getting the list right is harder than shipping one. Baymard found autocomplete on 80% of e-commerce sites, while only 19% got every implementation detail right. Its testing also saw long lists cause choice paralysis, so cut near duplicates and stop while the list still fits the screen.

3. Forgive typos

Junior

A search for brocoli showing only the line 0 results for brocoli

Senior

The same search showing results for broccoli, a link to search instead for brocoli, and three broccoli recipes

One missing letter leaves the junior screen empty. The senior one searches the likely word, says so in plain text and keeps the original one tap away.

Correct the query, but never silently. "Showing results for broccoli" explains why the list does not match the field, and "Search instead for brocoli" protects the person who meant exactly what they typed, such as a brand or a product code.

Typos should survive the suggestion list too. In its 2021 benchmark, Baymard reported that 69% of e-commerce sites did not offer relevant autocomplete suggestions for closely misspelled queries. Its two suggested routes are a spell check library and a hand-built map of the misspellings you find in your own search logs.

4. No results? Show a way

Junior

A help center search for late refund that returns only the words No results found

Senior

The same search saying no articles match late refund, with links to Refunds and returns, Cancel an order and Change a delivery date, and a Contact Support button

The junior screen is a wall. The senior one repeats the query, offers three nearby articles and ends with a button that reaches a person.

Baymard's benchmark found that nearly 50% of e-commerce sites fail to give people an effective way to recover from a search with no results. The first strategy it recommends is linking to categories related to the query. It also recommends putting support contacts on the page itself.

A tip such as "try fewer words" can stay, but it cannot be the whole answer, because Baymard saw people rarely read or apply search tips. Links do the work. For more on screens with nothing to show, read empty states are the product.

Junior

A Find recipes form that asks for diet, time and course in three dropdowns above a Search button, with no results

Senior

A search for pasta with Filter, Diet, Time and Course chips under the field, a count of 48 results and four pasta recipes

The junior form asks three questions before showing anything. The senior screen answers the query first, then offers the same three filters as chips over real results.

Filters make sense once there is something to narrow. NN/g describes faceted search as a way to refine a set of results, and stresses showing the controls and the results together, so people can see what each choice does.

On a phone, a row of chips keeps the common filters one tap away, and the Filter chip opens the rest. NN/g's tray pattern lays the filter panel over the results, which stay partly visible, with the total count always in view. For the grid and cards below those chips, see our search results page redesign.

6. Show where it searches

Junior

A search for logo files showing 3 results, with nothing to say which part of the workspace was searched

Senior

The same search with a design channel tag inside the field, the line 3 results in #design and a Search all of Acme instead action

Both screens list three messages. Only the senior one tells you they come from one channel, and how to look everywhere else.

A hidden scope makes people think a file does not exist. NN/g warns that scoped search is risky and says to always set the default scope to all. Narrow the search only when the person asks for it, for example by picking the design channel themselves.

Then make it loud. Put the scope label close to the field and again at the top of the results, which is what the tag and the "3 results in #design" line do. Finish with one action that widens the search to the whole product.

Starter code and colors

html
<form role="search"> <input type="search" name="q" aria-label="Search recipes"> </form>
css
input[type="search"] { height: 40px; border: 0; border-radius: 20px; padding: 0 16px; background: #F2F2F2; font-size: 16px; color: #111111; } .suggestion { min-height: 46px; border-bottom: 1px solid #E8E8E8; } .suggestion .added { font-weight: 700; } /* the part not typed yet */ .meta { color: #6B6B6B; } /* counts, hints, "Search instead" */ .chip { height: 36px; border: 1px solid #DCDCDC; border-radius: 18px; padding: 0 16px; }

The role makes the form a search landmark for screen readers, and the label names the field when the placeholder disappears. A full suggestion list also needs keyboard support, so start from a tested combobox component instead of a plain list of divs.

The five colors these demos use. Tap a color to copy its code.

The six fixes in one table

#JuniorSeniorWhere it shows
1An empty fieldRecent searches with a Clear actionOn focus
2Wait for the Search keyFull queries, untyped part in boldWhile typing
30 results for a typoCorrected results, original one tap awayAfter submit
4"No results found."Related links and a support buttonNo match
5A filter form firstResults first, filter chips on topResults
6A silent scopeScope tag, scoped count, search allField and results

To audit your own product, run six tests: focus the empty field, type three letters, misspell a common word, search for nonsense, look for filters, and search from inside one section. Field labels and hints follow related rules, covered in placeholder vs label and form design best practices.

FAQ

What are the most important search UX best practices?

Show recent searches on focus, suggest full queries while people type, correct typos openly, give a way forward on no results, let people filter after searching and show any limited scope.

What should a search bar show before anyone types?

The person's own recent searches, in a short list with a clear action. If there is no history yet, a few popular categories give a starting point.

How should autocomplete suggestions be styled?

When a suggestion completes the typed text, bold the part that has not been typed yet. When it matches the text anywhere in a phrase, highlight the typed text.

What should a no results page include?

The query that failed, links to related categories or articles, and a way to contact support. Search tips alone are not enough.

Should filters come before or after search results?

After, in most products. Show results for the query first, then let people narrow them with filters while the results stay in view.

Sources

More from Brainy Papers

Keep reading