Community Wishlist Survey 2022/Search/Highlight and scroll to search term on result page

From Meta, a Wikimedia project coordination wiki

Highlight and scroll to search term on result page

  • Problem: When I search the wiki for a term and select an page to read, I may not immediately see where that term is used on the page.
  • Proposed solution: Highlight and scroll to where the search term is mentioned on the result page
  • Who would benefit: Readers who use the search feature
  • More comments:
  • Phabricator tickets:
  • Proposer: Cinokat (talk) 09:52, 18 January 2022 (UTC)[reply]


I think the user means that if they search for a term, and the term is mentioned somewhere in a result, that when opening the result, they want the search term to be highlighted and scrolled to. —TheDJ (talkcontribs) 11:24, 18 January 2022 (UTC)[reply]

That's how that reads to me as well. --Izno (talk) 19:40, 18 January 2022 (UTC)[reply]
I've edited the Problem statement (mostly JI, plus some minor grammar improvements) to reflect this understanding (which is also how I read the origiinal). Trey314159 (talk) 17:38, 24 January 2022 (UTC)[reply]
I have also interpreted it this way and taken it a bit further to fill out all the other fields. Pinging Cinokat. Let us know know if we've misunderstood you. Thanks, MusikAnimal (WMF) (talk) 05:12, 27 January 2022 (UTC)[reply]
When you google a phrase and then click on a link to a Wiki page, the page scrolls to the phrase and the phrase is highlighted. It is probably speicific to + Chrome browser but definitely a very useful feature. So I guess implementing similar functionality inside wiki engine is welcome. SSneg (talk) 09:49, 2 February 2022 (UTC)[reply]
Google has two features for this. Their snippets do the highlighting, with text fragment highlighting. Next to Chrome, this is currently also in development for Safari, possibly shipping in Safari 16 later this year. In addition, they sometimes use sections results. Here, if they have a highlight in a particular section, they show the multiple subsections in the page (say History, Politics, Geography etc), and then if you click the result for such a section, it takes you there using a normal H2 anchor. —TheDJ (talkcontribs) 16:46, 7 February 2022 (UTC)[reply]