Behaviour SwRS-MDOKFSTUDIO-TOOLBAR-007
The chevron collapses the toolbar to its first row
When the reader presses the collapse button, the extension SHALL toggle the hidden attribute of the group that holds the navigation, view and review rows, which takes them out of the Tab order, set the button label, title and tooltip to Show view controls when collapsed or Hide view controls when expanded with aria-expanded to match, and set the attribute data-sphinx-preview-toolbar-state of the page root to collapsed or expanded.
Step 2 of path 1 in StRS-MDOKFSTUDIO-TOOLBAR-001: from “The toolbar is expanded” to “The toolbar is collapsed”.
Scenarios 5
The situations the tests check; open one to read it.
nominalCollapse then expand
Givenan expanded toolbar
Whenthe collapse button is pressed, then pressed again
Thenthe group is hidden, only the main row stays reachable by Tab, and then the group shows again with the same height
boundaryKeyboard order when collapsed
Givena collapsed toolbar
Whenthe Tab order of the toolbar is read
Thenit holds Refresh, Edit, Export to HTML and Show view controls only
boundaryButton and root attribute per state
| State | aria-expanded | Label, title and tooltip | data-sphinx-preview-toolbar-state of the root |
|---|---|---|---|
| collapsed | false | Show view controls | collapsed |
| expanded | true | Hide view controls | expanded |
The root never carries a data-sphinx-preview-toolbar attribute.
nominalAt start and after each press
Givena page that starts expanded
Whenthe page starts and the chevron is pressed twice
Thenthe attribute is expanded at start, collapsed after the first press and expanded after the second
nominalThe collapsed choice is kept for the workspace
Givena toolbar the writer collapsed in one preview
Whena new page opens in the same workspace
Thenthe new page starts with the toolbar collapsed; the choice is stored for the workspace and read back by the rules of SwRS-MDOKFSTUDIO-LIFE-169 and SwRS-MDOKFSTUDIO-LIFE-170