Behaviour SwRS-MDOKFSTUDIO-TOOLBAR-001
The toolbar has four rows of four titled buttons that float over the page
When a preview page is built, the extension SHALL render the toolbar, named Preview controls with the role toolbar, as four rows of four titled buttons in a fixed order (Refresh, Edit, Export and the collapse button; Anchor, Theme, Back and Next; Width, Fold, Zoom out and Zoom in; Table of contents, Side-by-side, Diff and Comments), give every button a data-tooltip equal to its title, show that tooltip with a readable contrast on hover and on keyboard focus, and fix the toolbar at the top right of the pane above the page content, inside the pane and without overlap between its rows.
Step 1 of path 1 in StRS-MDOKFSTUDIO-TOOLBAR-001: from “A preview page is built” to “The toolbar is expanded”.
Scenarios 7
The situations the tests check; open one to read it.
nominalWritable preview
nominalVisual order
nominalEvery button has a tooltip equal to its title
the attributes of the Theme and Edit buttons are read
the aria-label differs from the title (Preview theme: Current theme, Toggle edit mode) while data-tooltip equals the title
nominalTooltip on hover and on keyboard focus
the same button is reached with Tab and has the focus ring
the same tooltip appears with the same colours
The tooltip stays right-aligned with its button, 8 px below it, without translating horizontally on hover or focus. Disabled Back, Next and zoom controls dim only their icons: their tooltip background and text remain fully opaque, like enabled controls. Long theme labels keep the same anchor rather than moving left by half the label width.
boundaryRows stay inside the pane
| Input | Outcome |
|---|---|
| 360 px pane, each of the light, dark, white and cream themes, collapsed and expanded | each row ends above the next one, the left edge is not negative and the right edge is not past the pane |
| 900 px pane, each theme, collapsed and expanded | same outcome |
| zoom buttons pressed until 70 percent | the zoom button is disabled, the toolbar stays inside the viewport and does not overlap the sticky heading text |
| zoom buttons pressed until 200 percent | same outcome |
nominalScrolling
boundaryNothing else makes room
Implemented in 2
Tested by 5
Known limits (1)
- no code avoids the text that scrolls under the toolbar, and no code moves the toolbar when the find widget of VS Code opens; the layout-width scope handles only the first element of the document.