Repository navigation
Make the Files pane file list's headers and rows 24px targets (WCAG 2.5.8) - #19822
Merged
Merged
Conversation
The file list's header row was 19px tall. Each header's sort button, the role=button div axe measures, was 13px tall, and the File type header's was 13x13 in its 26px column, because the cell's 6px side padding (leaked from PackagesDataGridCommon.css's global .dataGridHeader rule) sat outside it. axe gave it a safe clickable space of 20px. The button now fills its cell with that padding moved inside it: every header button is 24px tall and File type's is 25x24, in a 25px header row (24px plus its bottom border). Header text and the Size/Modified resize splitters stay centered on an 18px line. File rows were 22.5px, so adjacent row checkboxes (13x13) had a safe clickable space of 21px. Rows are now 24px, with the checkbox centered in its cell (5.5px from the row top, was 3.8px), so neighboring checkboxes are 24px apart. The first checkbox's center is 13px below the header buttons when there is no ".." row. The rules are scoped to the Files list's own data grid class, so other grids are unchanged. Addresses #19786
The comment said the 18px line keeps ResizableHeader's splitter level with the header text. The splitter's -2px top margin puts it at y=1-19 of the 24px header, 2px above the text line (y=3-21). The comment now gives those positions; the layout is unchanged. Addresses #19786
The <br/> gave the File type sort button a line of height, since its only other content is visually hidden text. The header button's own 18px height now does that, so the button stays 25x24 without it (measured before and after) and still sorts when clicked. Addresses #19786
Removing the <br/> collapsed the sort arrow's wrapper, whose only other content is visually hidden text, to 0px tall when the list is sorted by File type. The arrow moved from y=456-463 to y=447-454, starting above the header's top edge (y=448). With the <br/> restored, the wrapper is 18px tall and the arrow is back at y=456-463 in both sort directions, level with the Name column's arrow. The comment now says what the line break is for. Addresses #19786
gtritchie
commented
Nov 26, 2026
gtritchie
commented
Nov 26, 2026
gtritchie
commented
Nov 26, 2026
gtritchie
commented
Nov 26, 2026
gtritchie
commented
Nov 26, 2026
The header button rule matched any div directly under a header cell. A non-sortable header renders its content straight into the cell, so a ResizableHeader there would have given its splitter and text divs the button's height and padding. The rule now matches [role="button"], as EnvironmentObjectGrid.css and ChangelistTableCellTableStyle.css do. Header sizes are unchanged (buttons 24px tall, File type 25x24). Addresses #19786
ResizableHeader's splitter is 18px tall, which covered y=0.5-18.5 of the old 19px header but only y=1-19 of the 24px header buttons. A click on the lower 6px of the Size or Modified column border sorted the column instead of starting a resize, with no col-resize cursor. In the Files list only, the splitter is now 24px tall from the button's top (y=0-24), sorted or not. The Object Explorer, which shares ResizableHeader.css, is unchanged. Measured on RStudio Server: dragging from 2px above the header's bottom edge resizes the column and leaves the sort unchanged. Addresses #19786
Runs axe-core's target-size rule on the file list and fails on any violation or Needs Review result. The existing a11y scans fail only on violations, and these targets have tabindex=-1, so axe reported them only as Needs Review. The test also checks that the scan measured the row checkboxes and the four sort headers, so an empty scan can't pass. On main's file list code it fails, listing the File type and Name sort buttons (13px tall) and every row checkbox (21px safe space). On this branch it passes. Addresses #19786
@axe-core/playwright opens a page of its own to merge its results, and Desktop's CDP connection to Electron refuses it (Target.createTarget: Not supported), so the test would fail on Desktop before its assertions. It is now tagged @server_only, as the suite's other axe tests are, and still passes on Server. Addresses #19786
RStudio E2E - all platformsAll tests passed!
All platforms - commit |
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Addresses #19786.
Fixes the axe WCAG 2.5.8 (Target Size, Minimum) findings in the Files pane's file list, listed under "Files list" on the issue: the column headers' sort buttons and the row selection checkboxes.
Approach
Column headers
role=buttondiv axe measures) was 13px tall in a 19px header row. The File type button was 13×13 in its 26px column, with a safe clickable space of 20px.PackagesDataGridCommon.css, whose.dataGridHeaderrule is global because the class is@external. The new rules are scoped under the Files grid's owndataGridWidgetclass, which keeps them to this grid and outranks that rule.ResizableHeader.css, which nearly covered the old 19px header; the Object Explorer, which shares that file, is unchanged.Rows
getRowHeight(), which the virtualized grid uses to size its scroll padding, returns 24 to match.Other data grids are unchanged.
Still open on #19786: the Files breadcrumb's "Go to project directory" (20×22.5) and "..." (20×20) buttons, the pane toolbars' buttons, the search boxes' clear button, and the split-button arrows.
Automated Tests
Adds
e2e/rstudio/tests/panes/files/files_list_target_size.test.ts, which runs axe-core'starget-sizerule on the file list and fails on any violation or Needs Review result (the existing a11y scans fail only on violations, and these targets were only ever Needs Review). It checks that the scan measured the row checkboxes and all four sort headers. It fails againstmain's file list code and passes here. It runs on Server only, like the suite's other axe tests:@axe-core/playwrightopens a page that Desktop's CDP connection to Electron refuses. The other Files pane specs that run on Server (file_monitor,files_narrow_resize) also pass.QA Notes
Measured on RStudio Server (Chrome) with axe-core 4.13's
target-sizerule run on the Files pane: no violations or Needs Review results in the file list (before: the File type header and every row checkbox were Needs Review). Checked by hand that clicking a header anywhere in its cell sorts, that sort arrows are centered in both directions (including File type), that checkboxes toggle, and that dragging the Size/Modified resize handles resizes the columns, including from the lower part of the header, without changing the sort.Not checked: Desktop, Windows, and dark themes. The change only sets sizes and padding, with no platform- or theme-specific rules.
To check by hand: the Files pane's header row and file rows should be slightly taller than in a release build, with text, icons, and checkboxes vertically centered.
Documentation
N/A
Checklist
NEWS.md