What the person is doing
Search results include long titles, summaries, transcripts, records, documents, tickets, messages, products, logs, or knowledge articles.
Application · lesson 11 of 20 · Search, Browse, And Discovery
Underlying principle: Discovery supports several starting points: a known term, a broad category, a partial memory, or a set of constraints. The interface helps people refine their understanding while they search.
Show query-linked highlighted terms inside relevant result fields and snippets, provide enough context and accessible emphasis, and keep the highlights synchronized with the submitted query and backend match data.
Discovery supports several starting points: a known term, a broad category, a partial memory, or a set of constraints. The interface helps people refine their understanding while they search.
Search results include long titles, summaries, transcripts, records, documents, tickets, messages, products, logs, or knowledge articles.
Show query-linked highlighted terms inside relevant result fields and snippets, provide enough context and accessible emphasis, and keep the highlights synchronized with the submitted query and backend match data.
Submitted query with one or more highlighted result fields.
Can users tell exactly which words, phrases, or fragments caused each result to match?
Changing the query updates highlighted words, snippets, match counts, and result summaries together.
Search results include long titles, summaries, transcripts, records, documents, tickets, messages, products, logs, or knowledge articles.
Open the working example, try its controls, and compare the behavior against the decision guidance.
Search results include long titles, summaries, transcripts, records, documents, tickets, messages, products, logs, or knowledge articles.
Show query-linked highlighted terms inside relevant result fields and snippets, provide enough context and accessible emphasis, and keep the highlights synchronized with the submitted query and backend match data.
Submitted query with one or more highlighted result fields.
The visual highlight is disconnected from the query that produced the result list.
Use semantic text markup such as mark for highlighted passages when the highlight indicates relevance in the current search context.
Algolia - checked
Algolia documents highlighting and snippeting for explaining why a result matched, including matched words, snippets, pre/post tags, performance limits, and sanitization.
Elastic - checked
Elastic documents highlighted fragments per search hit and cautions that complex query logic may produce highlights that do not map exactly to all query conditions.
MDN Web Docs - checked
MDN documents mark as suitable for context-relevant passages such as words that matched a search operation.
W3C Web Accessibility Initiative - checked
WAI documents that color must not be the only way information is distinguished, supporting non-color match cues.
Source trail checked: