Following on from @nray's analysis in T260412#6419741 we will switch to a header-first DOM
We will tie the move to the existing $wgVectorIsSearchInHeader feature flag. This means that the rollout of the DOM changes will not impact cached HTML.
As part of this change, the jump links also change:
- "Jump to navigation" and "Jump to search" links were removed with the reasoning that the navigation/search was now placed first/early in the DOM order making these links no longer necessary.
- "Jump to content" was added so that users can skip the navigation and jump to the content.
Acceptance criteria
- When VectorIsSearchInHeader is enabled, a header-first DOM will be used
- When VectorIsSearchInHeader is disabled, the existing DOM will be used
- All CSS required by the existing layout that is not needed by the new layout will be tied to the body class skin-vector-search-header-legacy which is currently used on all pages.
- All CSS required by the new DOM based layout that is not needed by the new layout will be tied to the new body class skin-vector-search-header which will only appear when we enable the feature flag
- On first deploy, VectorIsSearchInHeader feature flag should be disabled so that the new CSS gets cached before DOM changes. When new CSS is cached, the feature flag can then be enabled.--false is the default.
QA
- A developer should verify that the HTML layout when $wgVectorIsSearchInHeader = false is not changed by the patch that introduces the header-first DOM
- No difference in legacy mode.
- #mw-page-base is gone. This is intended.
Sign off
- With this change, the sidebar is planned to be moved out of the header and into the .mw-workspace-container. One negative side effect of this change is that users will no longer be able to tab from the sidebar button into the sidebar without us using JavaScript. Create a task for implementing the ability to tab from the sidebar button into the sidebar -- See T262872.