Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-MYST-099

Tabs follow the keyboard and the click

When a tab of a tab set is clicked, or has the focus and receives an arrow, Home or End key, the extension SHALL select the target tab, show only its panel, move the focus to it for keys, and select the tabs with the same sync key in the other tab sets of the same sync group.

Step 2 of path 2 in StRS-MDOKFSTUDIO-MYST-016: from “The tab bar shows the selected panel” to “The panel of the clicked tab is shown”.

Scenarios 9

The situations the tests check; open one to read it.

nominalThe arrow, Home and End keys select a tab and move the focus
Givena tab set with the tabs Python, Node and Shell and the focus on the Node tab
WhenArrowRight, ArrowLeft, Home and End are pressed in turn
Thenthe selection and the focus go to Shell, Node, Python and Shell, only the panel of the selected tab is shown, and the keys are consumed
nominalA click selects a tab
Givena tab set with the tabs Python, Node and Shell
Whenthe reader clicks the Shell tab
Thenthe Shell tab is selected and only its panel is shown, without moving the focus by script
boundaryThe selection wraps around
Givena tab set whose last tab has the focus
WhenArrowRight is pressed, then ArrowLeft on the first tab
Thenthe selection wraps around to the first tab, then to the last
refusalOther keys change nothing
InputOutcome
ArrowUp, ArrowDown, a letter, or any key with Shift, Alt, Ctrl or Meta, or during compositionnothing changes and the key is not consumed
ArrowLeft or ArrowRight pressed in a panel or in text outside a tabno tab changes and the key is not consumed
nominalTabs with the same sync key follow each other
Giventwo tab sets of the same sync group whose tabs carry the sync keys `py` and `js`, and a third set of another group
Whenthe reader selects the `js` tab of the first set
Thenthe `js` tab of the second set is selected too, without taking the focus, and the set of the other group is untouched
boundaryA nested tab set selects within its own set
Givena tab set inside a panel of another tab set
Whena tab of the inner set is selected
Thenonly the inner set changes
boundaryA re-render keeps the chosen tabs
Givena reader who selected tabs in several sets
Whena content patch renders the sets again
Thenthe page puts back the choices it remembers, by position of the set, unless the set lost tabs
nominalThe line marker selects a tab the way a click does
Givena tab set whose second tab is not shown
Whenthe line marker is requested on a line of that tab item
Thenthe tab is selected as a click selects it (the sets of its sync group follow, the choice is remembered, the focus does not move) and the layout is measured again
boundaryAfter a patch each set shows its latest choice
Givena set the reader selected by click and a sync choice made later in its group
Whena content patch renders the sets again
Theneach set shows the later of its own selection and its group's sync choice

Implemented in 1

Tested by 4