Repository navigation
Make toolbar controls 24px targets (WCAG 2.5.8) - #19798
Conversation
Center it over the file list's checkbox column and move the breadcrumb right so its 24px spacing circle clears the Home link and the New Folder button. Addresses #19786.
The secondary toolbar wrapper's -1px top margin tucks its first pixel row under the pane above, so the menu showed 23px of its 24px box (y 113-136 of 112-136). Grow every SecondaryToolbar slot from 24px to 25px so 24px of toolbar shows over its bottom border, and move the menu down 1px into view, keeping its label level with the environment menu. Addresses #19786.
Home and the other breadcrumb links were 22px boxes, clipped to 20px visible (y 425-445). Give the path toolbar the same 25px slot as a secondary toolbar, which shows 24px over its bottom border, and size the links to fill it. The toolbar's rstheme_secondaryToolbar class held its height at 21px with !important, so it now takes tallerToolbarWrapper as SecondaryToolbar does. The Files pane's breadcrumb rules targeted breadcrumb-filepane, a class no element has (the widget's dependent name is breadcrumbFrame-filepane), so they are replaced by a filePane class the toolbar adds. Addresses #19786.
The toolbar row started 1px above the visible slot on macOS and Linux, so the Environment language menu needed a 1px top margin, which on Windows (whose toolbars already sit 1px lower) pushed its bottom row out of view: 23px visible instead of 24. Give every secondary toolbar row the 1px top margin Windows uses, and drop the menu's own offset. Addresses #19786.
A one-character folder name made a link about 23px wide (17px of padding plus the text); a min-width keeps it at 24px. Addresses #19786.
The main toolbar showed 22px (y 37-59 on RStudio Server), and its buttons were 20x21 or wider, 20.5px visible; the Open button's recent files arrow was 5x21. axe found the Open button and its arrow 9.2px of clear space apart, and Save 23.2px from the arrow. The toolbar now reaches 2px further into the gap below the menu bar to show 24px, without moving the panes, and every button is at least 24x24. Icon buttons drop their 4px gap, so they keep their 24px pitch, and the arrow gets a 24px box with the arrow at its left. Items after it move 15px right (Save from x=181 to 196). The Desktop header lays out the toolbar differently and is unchanged. Addresses #19786.
On RStudio Desktop the main toolbar showed 23px (y 0-23), its buttons were 20x21 (the Open button's recent files arrow 5x21), and axe found the same spacing failures as on Server: Open and its arrow 9.2px of clear space apart, Save 23.2px from the arrow. Apply the main toolbar's button rules to both headers. The toolbar table is 24px tall instead of 27px, which leaves the web row's center where it was; on Desktop the wrapper grows to 25px and the table starts 1px down, so all 24px show within the header's 29px. Measured on macOS Desktop (dev build): every button 24x24 and fully visible, the panes unmoved. Addresses #19786.
The recent files arrow beside Open had become a 24x24 box with the arrow at its left, which left blank space after it and moved the items to its right 15px. Its design and target size will be addressed separately, so it is back to its earlier 5x21 box; Save is back at x=181 on Server and x=117 on Desktop. Open, Save, and the other main toolbar buttons stay 24x24. Addresses #19786.
The 24px main toolbar buttons center a 20px icon, leaving 2px inside each edge, while separators kept a 5px right margin and buttons a 0-8px right margin. The gap between a separator's line and the content beside it was uneven: 2px left / 8px right next to icon buttons such as Create a Project, 4px / 8px after menu buttons, 8px / 8px after Addins, and 8px / 6px around the search box (main branch: 4px / 6px for buttons). Every main toolbar button now insets its content 2px and drops its margin, separators get 2px / 1px margins (mirrored for the mirrored dark-theme image), and the search box and restricted-mode icon get 2px margins. Every separator in the main toolbar now has 4px on each side, on Server and Desktop, in light and dark themes. Buttons without a separator between them keep their spacing, the latching Assistant button keeps its padding, and the project menu keeps its position at the right end. The New File and Workspace Panes menu buttons are 4px wider (29px -> 33px, 30px -> 34px). Addresses #19786
The Assistant toggle raised its icon and label 2px to fit a 20px button, but the main toolbar's buttons are now all 24px tall, so its label sat 2px above the Project menu's beside it (top at y=38.3 vs 40.3) and its icon 2px above the other icons (36.3 vs 38.3). The icon now keeps the toolbar's usual 2px offset, and the label the usual 4px in place of the latching buttons' 0: label at 40.0 vs 40.3, icon at 38.0 vs 38.3, both centered in the 24px latched frame. The 20px height it set was already overridden by the toolbar's 24px and is removed. Addresses #19786
The main toolbar's separator margins used the margin shorthand, which also reset the Linux Desktop separators' 2px top margin to 0, moving them 2px up there. They now set only the side margins (top margin back to 2px on Linux Desktop; side margins and the 4px gaps unchanged). GlobalToolbar.getHeight() reported 27, the toolbar's earlier CSS height; it now reports the 24px the toolbar has. Comments now describe what the code does: the last-button margin rule applies to every group's last button, the select-all checkbox lines up with the file list's checkboxes (center at 17.5px of the 30px column, not centered), and its 12.5px spacing is measured from the pane toolbar's buttons above. Addresses #19786
|
|
||
| .globalToolbar .search, | ||
| .globalToolbar .restrictedModeIcon { | ||
| margin: 0 2px; |
There was a problem hiding this comment.
The restricted-mode lock icon (14px, clickable, shown for untrusted projects) loses 2px of its right margin here: margin: 0 2px overrides .restrictedModeIcon { margin-right: 4px }. Its center moves from 11px to 9px from the project menu button, further short of the 12px that WCAG 2.5.8's spacing exception needs. It isn't among this PR's fixes or on the issue's still-open list. Since it only appears for untrusted projects, the axe scans may not have reached it.
Suggest keeping at least 5px on its right, or giving it a 24px-wide box (e.g. min-width: 24px; justify-content: center).
There was a problem hiding this comment.
Fixed in e483ed2: the lock now has a 24×24 box with the 14×14 icon centered and no margins. Its center is 12px from the project menu's box, up from 9px (11px on main), and it has 7px of clear space on each side.
The lock also has no role or tabindex, so keyboard users can't reach it and screen readers don't identify it as a button. That's tracked separately in #19801.
| height: 24px; | ||
| min-width: 24px; | ||
| margin-top: 0; | ||
| margin-right: 0; |
There was a problem hiding this comment.
Nit: the description says the Open button's recent-files arrow keeps its earlier size, but its spacing changes too. This margin-right: 0 overrides .toolbarButton.noLabel { margin-right: 4px }, so the gap between Open and the arrow goes from 4px to 0, and the arrow's center moves from 6.5px to 2.5px from the Open button. The arrow is already a tracked follow-up, so it's probably enough to mention this in that note.
There was a problem hiding this comment.
Agreed. The description now gives the before and after spacing: the box-to-box gap went from 4px to 0, the arrow's center from 6.5px to 2.5px from Open's box, and the visible icon-to-arrow gap from 4px to 2px. The same numbers are in the split-arrow note on #19786, alongside the arrow's own size finding: #19786 (comment)
The lock shown in the main toolbar for untrusted projects is a 14x14 target. Its 2px margins left its center 9px from the project menu's box (11px on main), short of the 12px WCAG 2.5.8 needs for a small target. It now has a 24x24 box with the lock centered and no margins: its center is 12px from the project menu's box, and the lock has 7px of clear space on each side, to the separator line and to the project menu's icon. Addresses #19786
RStudio E2E - all platformsAll tests passed!
All platforms - commit |
* Stop pane min/max buttons covering the toolbar beneath them The 24px minimize, maximize and close buttons started 2px below the top of the window frame, so their last 2px lay over the top of the toolbar row and took its clicks there. A toolbar button under them had 22px of clickable height. axe measured a safe clickable space of 20px for the Files pane's refresh button, where 24px is needed. The buttons now start at the top of the frame (top 2px -> 0) and end where the title bar does. Each 14px icon keeps its position: it is drawn 7px from the top of its button, where centering put it 5px. Addresses #19786 * Make the Files breadcrumb's project and browse buttons 24px targets In the Files pane, "Go to project directory" was 20x22.5 and "Go to directory" (...) was 20x20, in a 42px frame at the end of the 24px breadcrumb row. axe reported both as WCAG 2.5.8 violations. Both are now 24x24 there, in a 48px frame, with the project icon centered in its button (it sat 1px from the top). File dialogs share the widget: their buttons take the same 24px width but keep the dialog breadcrumb's 20px height. Addresses #19786 * Make pane toolbar buttons 24px targets (WCAG 2.5.8) The main toolbar's button rules from #19798 now apply to every toolbar: buttons are at least 24x24 (they were 21px tall and as narrow as 14px), with 2px side padding in place of their 4px or 8px right margins. Split-button arrows keep their 5x21 size; they are to be handled separately. Toolbar rows grow to fit: the slot is 25px (was 22px), showing 24px of toolbar over the 1px border, as SecondaryToolbar already did. Its height override and the tallerToolbarWrapper class are folded into Toolbar. Offsets that positioned controls in the old row are removed or replaced: - Source: the forward button's -6px margin, which now overlapped back by 6px, and the Knit button's inline margins - Source/Visual toggle: a 2px top margin that pushed it out of the row - Environment: the language menu's own 24px sizing and the memory menu's -3px margin, which put it 1.5px above the row - search boxes in second-row toolbars: a 2px offset (and Help's -1px override) that left them off center - a toolbar checkbox gets a 3px left margin, keeping its center 12px from a button before it - a button with no icon gets an icon's height, so its label lines up with its neighbors' (it sat 3px lower) Addresses #19786 * Test pane toolbar target sizes with axe Runs axe-core's target-size rule on the Environment, Files and Console toolbars and the Files breadcrumb, failing on violations and Needs Review results alike. Split-button arrows (5x21) are skipped; they are still open on the issue. Addresses #19786 * Fix toolbar layouts that assumed the old row height Found in review of the 24px toolbar change: - Windows, Server: the main toolbar took a 1px top margin it didn't have before (0 -> 1px), hiding its last pixel row. That rule is removed, with the older Windows rule it had made redundant. - The file viewer's toolbar (Git/SVN history) reserved 23px for a 25px toolbar; it now uses Toolbar's height. - The Traceback panel's minimize icon, a 14x20 button that shares the window frame styles, was drawn 7px down like the 24px title bar buttons. That offset now applies only to WindowFrame's own buttons. - Options > Pane Layout: the column toolbar's wrapper was 20px for 24px buttons (now 24px). - Inline offsets that placed a button in the old row are removed: Connections actions with no icon (-5px), the Quarto presentation slides menu (-3px), the Shiny window's Reload (1px), View Log (3px). - The Packages pane's Windows-only 2px lift for text-only buttons is removed; every icon-less button's label is now leveled by the shared rule. - The Git diff toggle's even padding, which the shared rule overrode, is restored. Its 19px height and the visual editor toolbar's 20px height and margins were also overridden, and are deleted. Addresses #19786 * Fix toolbar checkbox spacing on Windows and Help's find buttons A toolbar checkbox gets its 3px left margin on Windows at standard DPI, as it already has on macOS, Linux and high-DPI Windows. Without it the checkbox's center was 9.5px from a button before it, where 12px is needed; with the Windows body class simulated it is now 12.5px. Help's Find Previous and Find Next buttons, shown while searching a topic, are 24x24 (were 19x18). Addresses #19786 * Fix the console-only frame's title bar icons and header buttons When Console is the only tab in its pane, the frame shows a header in place of a tab strip and toolbar: - Its maximize and minimize buttons were already at the top of the frame, so the 7px icon offset added for the other frames would have drawn their icons 2px low. They keep their centered icons. - Find in Console (14x21) and Clear console (20x21) sit in that header, not in a toolbar, so the shared 24px rule missed them. They are 24x24 now, as is Go to working directory (was 20x21). Addresses #19786 * Remove the Plumber window's Reload button offset Its inline 1px top margin, the same one removed from the Shiny window's Reload button, set it 1px below its neighbors in the 24px toolbar row. Addresses #19786 * Exempt the split-button arrow by element in the toolbar target-size test The test skipped any target axe measured as 5x21. It now excludes the one split-button arrow in the scanned toolbars, Environment's refresh options, by id. Addresses #19786 * Keep the console-only header's buttons clear of the console The header centers its content in a 19px row under 4px of top padding, so its 24px buttons ran 1.5px past the header's bottom edge, where the console covered them. A -3px top margin lays each button out as 21px tall, as it was before, so it spans the header exactly (69..93 where the header is 69..93), and 3px of top padding keeps its icon where it was. Hit-tested: each button takes clicks across its full 24px height. Addresses #19786
Intent
Addresses #19786.
Fixes the axe WCAG 2.5.8 (Target Size, Minimum) findings reported so far in the main toolbar, the Environment pane, and the Files pane, by making those controls 24px targets or spacing them so their 24px circles stay clear of their neighbors.
Approach
Main toolbar (Server and Desktop)
Secondary toolbars
Environment pane
Files pane
.breadcrumb-filepanerules that never matched: the dependent style name GWT produced wasbreadcrumbFrame-filepane.Still open on #19786 (noted on the issue): the search boxes' clear (×) button (11×11), the Files pane's "..." (Go to directory) button (20×20), and the split-button arrows. The lock icon also can't be reached by keyboard or identified by screen readers; that is #19801.
rstudio-pro: no changes are needed. Pro's credentials menu sets an inline 8px right margin that overrides the toolbar's new last-button rule, so it will sit 2px further left than before. Deleting that inline margin restores its position.
Automated Tests
None; these are layout changes, measured by hand instead.
QA Notes
Measured with axe-core 4.13's
target-sizerule, element boxes clipped to their overflow-hidden ancestors, and row-by-row hit tests:windowsbody classrstudio-themes-darkbody classNot run: Linux Desktop. Its toolbar separators have a 2px top offset that only Desktop builds include.
To check by hand, compare against a release build: the main toolbar, the Environment pane's language menu, and the Files pane's checkbox and breadcrumb should look the same, apart from the shifts above.
Documentation
N/A
Checklist
NEWS.md