This task proposes a possible solution for the Wikidata-specific task T317681, with implications for new Vector search in general.
Currently, navigation for search results in the new Vector search works in two different ways.
- If you interact with a search result as a link (left-click, middle-click, right-click + open in new tab, etc.), it sends you to the link address. With the default Vector URL generator, that link address is a Special:Search URL.
- If you highlight a search result using the arrow keys on the keyboard, and then press Enter, then the behavior is the same as if you had entered the result’s label by hand and pressed Enter afterwards: you are sent to Special:Search with the result’s label as the search text, plus a hidden input for a wprov parameter.
We (Wikidata developers) propose that selecting a search result using the keyboard should also navigate to the search result’s URL, as if it had been followed as a link. (However, if a search result is highlighted, but then the input field is edited further before pressing Enter, that should count as a form submission again.) By default, this would barely make a difference: both URLs point to Special:Search, which usually redirects to the page whose title exactly matches the search input. (One URL is currently missing the wprov parameter, but that could be added to the search result URL anyways – @phuedx thought the lack of wprov when middle-clicking a search result might even be a bug.)
However, this would make a big difference on Wikidata. We would configure the Wikidata search client (wgVectorSearchClient override) to directly return item page URLs, bypassing Special:Search – because searching for the label of an item will not redirect to that item: in fact, the list of search results for an item’s label doesn’t even necessarily include that item, if its label was sufficiently generic and there are too many other search results.