With T296671, redirects are resolved in search results.
With T303013, UI will notice when a result comes from a redirect.
However, that would not solve the following issue with redirects-to-anchor results:
QA steps
- Search for "recdns"
- Click link
Currently: Navigate to Name_server (incorrect behaviour)
Expected: Navigate to Name_server#Recursive_query
Requirement
Scope: Desktop and mobile web search. Redirects that include anchors or section fragments must preserve the fragment in API responses and resulting links:
- Clicking a search suggestion or result that is a redirect to a section navigates to the fully resolved URL with fragment (e.g., Name_server#Recursive_query).
- Users should not be dropped at the top of the destination page when the redirect target is a section anchor.
BDD
Feature: Preserve section fragments in redirects from search results
Scenario: Redirect to section from search
Given a search result corresponds to a redirect that points to a section (with a fragment)
When I click the search result link
Then I am navigated to the destination page including the correct section fragment
And the viewport is scrolled to the sectionTest Steps
Test Case 1: Redirect with fragment navigates correctly
- Go to search input and type "recdns".
- Select the "recdns" result from the suggestions or search results.
- AC1: The destination link points to Name_server#Recursive_query (contains the fragment).
- AC2: Browser navigation loads Name_server and scrolls to the "Recursive query" section.
- AC3: No navigation occurs to just Name_server without the fragment.
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T306150#11154855 |
| 2 | ✅ | T306150#11154855 |
| 3 | ✅ | T306150#11154855 |
