Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-BLOCK-254

Right and Left move the block selection down and up the structure

When edit mode is on and no editor is open, the page SHALL move the keyboard selection one level down with ArrowRight (a table to its first cell, an admonition, card or tab to its first inner block, a list to its first item, a list item to its first inner block, the whole page to its first block) and one level up with ArrowLeft or Escape, move a selected table cell with the four arrow keys without wrapping, and open with Enter the editor of the selected cell, list item or block of a list item.

Part of StRS-MDOKFSTUDIO-BLOCK-008, outside the paths drawn on its map.

Scenarios 4

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

nominalRight goes down, Left and Escape go up
Givenedit mode on, no editor open and a block selected by the keyboard (or no selection, with the page itself holding the focus)
Whenthe writer presses ArrowRight
Thena selected table selects its first cell (the first header cell), a selected admonition, card or tab selects its first inner mapped block, and with nothing selected the first block of the page is selected; the new selection is outlined in the focus colour and announced, and ArrowLeft or Escape returns to the parent block
InputOutcome
ArrowRight on a block with no inner block and no cellsNothing changes
ArrowLeft on a top-level block, or with nothing selectedNothing changes
Escape on a top-level blockThe selection is cleared, as in BLOCK-004
ArrowUp or ArrowDown on an inner blockThe selection moves to the previous or next inner block of the same parent and stops at the first and the last
ArrowUp or ArrowDown on a top-level blockThe block-to-block selection of BLOCK-004
A block that comes from an includeIt is never entered
nominalWalking the cells of a table
Givena table cell selected by the keyboard
Whenthe writer presses ArrowLeft, ArrowRight, ArrowUp or ArrowDown
Thenthe selection moves to the neighbouring cell and stops at the edges of the table (no wrap), a row with fewer cells clamps the column, and the selected cell carries `data-sphinx-preview-cell-focus`, drawn with the focus colour of the block selection ring, and is announced as "Table cell row R, column C selected"

Escape returns the selection to the table block. Enter opens the cell editor through the same path as a click on the cell, and the cell highlight goes away.

nominalWalking a list
Givenedit mode on, no editor open and a list selected by the keyboard, whose first item (lines 80 to 83, line 83 blank) holds two paragraphs (lines 80 and 82) and whose second item holds one paragraph (lines 84 and 85)
Whenthe writer presses ArrowRight, then Enter; or ArrowRight twice, ArrowDown, then Enter; or ArrowRight twice, ArrowLeft twice, then Enter
ThenArrowRight selects the first item and Enter opens it on lines 80 to 83; ArrowRight on the item selects its first paragraph, ArrowDown the second, and Enter opens that paragraph only, on lines 82 to 83 (a block mapped to one line reaches the line before the next block of the item, or the end of the item, so a paragraph of a tight item keeps all its wrapped lines); ArrowLeft goes back to the item, then to the list, and Enter on the list opens the whole list, lines 80 to 85

A click on a list item opens the item, not the block under the click (SwRS-MDOKFSTUDIO-BLOCK-014): only the keyboard reaches a block inside an item.

refusalKeys that belong to other controls
InputOutcome
Any of these keys with edit mode off, an editor open, or inside a text box, a field or the properties tableNot handled here
Any of these keys with Shift, Alt, Ctrl or CmdNot handled here (Shift extends a run, BLOCK-140; Alt moves, BLOCK-156)

Implemented in 5

Tested by 5