Skip to content

Make the Files pane file list's headers and rows 24px targets (WCAG 2.5.8) - #19822

Merged
gtritchie merged 11 commits into
mainfrom
bugfix/files-list-target-size
Nov 27, 2026
Merged

gtritchie merged 11 commits into
mainfrom
bugfix/files-list-target-size

Conversation

@gtritchie

@gtritchie gtritchie commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

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

  • Each header's sort button (the role=button div 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.
  • The button now fills its header cell: every header button is 24px tall and File type's is 25×24. The header row is 25px (24px plus its bottom border), up from 19px.
  • The cell's 6px side padding moves inside the button, so the header text keeps its position. That padding came from PackagesDataGridCommon.css, whose .dataGridHeader rule is global because the class is @external. The new rules are scoped under the Files grid's own dataGridWidget class, which keeps them to this grid and outranks that rule.
  • Header text and sort arrows stay vertically centered.
  • The Size and Modified column resize handles are stretched to the header button's full 24px, so the whole column border resizes. They are 18px tall in ResizableHeader.css, which nearly covered the old 19px header; the Object Explorer, which shares that file, is unchanged.

Rows

  • Rows are 24px, up from 22.5px, so adjacent checkboxes (13×13) are 24px apart. Their safe clickable space was 21px.
  • The checkbox is centered in its cell (5.5px from the row top, was 3.8px). When there is no ".." row, the first checkbox's center is 13px below the header buttons.
  • 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'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 were only ever Needs Review). It checks that the scan measured the row checkboxes and all four sort headers. It fails against main's file list code and passes here. It runs on Server only, like the suite's other axe tests: @axe-core/playwright opens 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-size rule 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

  • If this PR adds a new feature, or fixes a bug in a previously released version, it includes an entry in NEWS.md
  • If this PR adds or changes UI, the updated UI meets accessibility standards
  • A reviewer is assigned to this PR (if unsure who to assign, check Area Owners list)
  • This PR passes all local unit tests

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 gtritchie added this to the 2026.12 (Parrot Balsam) milestone 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
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
5857 0 265 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1467 0 49 0
✅ desktop-macos 1463 0 54 0
✅ desktop-windows 1462 0 60 0
✅ server-linux 1413 0 54 1
✅ setup 48 0 32 0

View report online


All platforms - commit 9370bd6cb9902145dcca85a1abc2e2197616bd7e - Run #2534

@gtritchie
gtritchie merged commit eb0cf24 into main Nov 27, 2026
45 checks passed
@gtritchie
gtritchie deleted the bugfix/files-list-target-size branch November 27, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant