Any time a template or parameter receives user events, it should be highlighted in both the sidebar and content, and if necessary the page should scroll to make it visible.
**Acceptance criteria**
Syncing from left to right:
|** action on the left **| results in the **desktop skin** | results in the **mobile skin** | results in **narrow mode** T290975
| ----- | ----- | ----- | -----
| press **enter** or mouse **click on** an **item** in the sidebar | [x] scroll into view [x] focus moves to input field | [x] scroll into view [x] focus stays (because otherwise the text input opens automatically, see also T291080) |after view flip: [x] scroll into view
| **click on** an **parameter** in the sidebar to remove it and it is selected | **TBD** / current behavior: the next parameter will be selected and focused in the content | **TBD** / current behavior: next parameter is selected in the sidebar, scrolled into view, not focused | **TBD** / current behavior: after view flip, selected scrolls into view
| **click on** an **parameter** in the sidebar to remove it | **TBD** / current behavior: will just be removed with no other effect | **TBD** / current behavior: will just be removed with no other effect | **TBD** / current behavior: after view flip, selected scrolls into view
| press **enter** or mouse **click on** a **template name** in the sidebar | [x] scroll into view [x] focus moves to link in description | [x] scroll into view [x] focus stays (because otherwise the text input opens automatically, see also T291080) | after view flip: [x] scroll into view
| press **space** to **select a checkbox** | [x] scroll into view [x] focus stays in sidebar T296996 | [x] scroll into view [x] focus stays in sidebar T296996 | -
| press **space** to **unselect a checkbox** | [x] no scrolling [x] no focus | [x] no scrolling [x] no focus | -
| **cursor keys** (up and down) | [x] no scrolling [x] no focus | [x] no scrolling [x] no focus | -
| click **new template** button | [x] focus on input | [x] focus on input T291067 | after view flip (see also T291365): [x] scroll into view
| press **space** to select a template or wikitext transclusion in the sidebar | TBD | TBD | TBD
Syncing from right to left:
| **action in the right sidebar **| results in the **desktop skin** | results in the **mobile skin** | results in **narrow mode** |
| ----- | ----- | ----- | -----
| focus an **input element** | [x] scroll into view [x] highlighted T311204 | [x] scroll into view [x] highlighted T311204 | after view flip: [x] scroll into view [x] highlighted |
| focus a **wikitext input** | [x] scroll into view T291381 [x] highlighted | [x] scroll into view T291381 [x] highlighted | after view flip: [ ] scroll into view [x] highlighted
[x] Disable the bogus auto-scroll feature described in T289043#7297679.
**Dev notes**
This partly depends on the keyboard navigation work in {T285323}, which will refactor events. We'll probably need to disconnect old sidebar events, either by preventing it from being created, or by putting conditionals around code that connects its event handlers.