Skip to content

Make the Git changelist's headers and rows 24px targets (WCAG 2.5.8) - #19840

Merged
gtritchie merged 13 commits into
mainfrom
bugfix/git-grid-target-size
Nov 30, 2026
Merged

gtritchie merged 13 commits into
mainfrom
bugfix/git-grid-target-size

Conversation

@gtritchie

@gtritchie gtritchie commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Intent

Addresses #19786.

The Git pane's changelist header buttons were 13px tall in a 16px header row. axe reported Staged (41×13) and Status (51×13) as Needs Review, with a safe clickable space of 17px. Path is also 13px tall, and axe flags it too when the pane is narrow. Rows were 18px tall, so neighboring rows' go-to-change buttons (12×10) had a 12px safe space. The Staged checkboxes (15×15) were 18px apart as well; axe doesn't count them as targets because they are images with role="checkbox".

Approach

All changes are in ChangelistTableCellTableStyle.css, which the Git pane, the Review Changes window, the SVN pane, and the SVN Commit dialog share.

  • Headers: each sort button fills its cell, with the cell's padding moved inside it, and is at least 24px tall (3px around an 18px line). The header row is now 25px tall (24px plus its bottom border). Staged is 45×24 and Status 55×24. The sort arrow stays centered (y=8–16). min-height rather than height, so a label that wraps grows the button instead of being clipped. Non-sortable headers (only go-to-change, whose label is visually hidden) keep the base 1px 2px padding.
  • Rows: 24px tall, up from 18px, so checkboxes and go-to-change buttons in neighboring rows are 24px apart and pass by spacing. Each row's contents move down 3px together and keep their alignment with the file name: text spans y=5–19 (was 2–16), the checkbox 6.3–21.3 (was 3.3–18.3), and the go-to-change button 8.3–18.3 (was 5.3–15.3). The list is about a third taller for the same number of files.

Also corrects a pre-existing comment in CommitListTableCellTableStyle.css that described the changelist's header styling wrongly.

Still open on #19786: the search boxes' clear button and the Packages pane's grid.

Automated Tests

Adds e2e/rstudio/tests/panes/git/changelist_target_size.test.ts. It creates a Git project with untracked files and a .gitignore that already ignores .Rproj.user (so RStudio has nothing to add on project open and the first status is final), selects a row, runs axe-core's target-size rule on the changelist, and fails on any violation or Needs Review result, since the targets have tabindex=-1. It checks that the scan measured the three sort headers and at least three go-to-change buttons, so an empty scan can't pass. Because axe skips the checkbox images, it also measures them and requires neighboring checkboxes' centers to be at least 24px apart.

  • On main's CSS it fails, listing the Staged, Status, and Path headers.
  • With only the header fix it fails, listing five go-to-change buttons.
  • With the whole branch it passes.
  • With a .cellTableSelectedRow { height: auto } rule placed after the row rule, it fails on the go-to-change buttons in and beside the selected row. The row is selected because the base sheet's rule of that name has the same specificity as the 24px row rule.

The "violations plus Needs Review, expect none" assertion is now expectNoFindings in utils/a11y.ts, shared with the toolbar and Files list target-size tests, which still pass.

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 existing changelist_checkbox_a11y.test.ts, which stages a file by clicking its checkbox, also passes.

QA Notes

Measured on RStudio Server (Chrome) with axe-core 4.13: no violations or Needs Review results in the Git pane's changelist. Checked the Review Changes window: headers and rows are 24px there too. Checked SVN with a local repository (Subversion 1.15, file:// checkout): the SVN pane's headers (Status 55×24, Path) and rows are 24px, and it has no checkbox column; the SVN Commit dialog's "Files to commit" headers (Commit 46×24, Status 55×24, Path) and rows are 24px, with checkboxes centered.

Not checked: Desktop, Windows, and dark themes. The change sets only sizes and padding, with no platform- or theme-specific rules.

To check by hand: in the Git pane, the header row and file rows should be taller than in a release build. Clicking a header sorts, and the sort arrow is centered. Checkboxes stage and unstage, and go-to-change buttons open the file.

Review findings not acted on

For reviewers, findings from local /code-review and roborev passes that were not changed, and why:

  • "The checkbox spacing check should allow a tolerance (e.g. ≥ 23.5px), since fractional layout could give 23.99px." Not changed. Rows are exactly 24 CSS px, and every row lays out the same way, so the difference between neighboring checkbox centers is exact. Device scale factor doesn't affect CSS-pixel layout values. A tolerance would also let spacing below the 24px the criterion requires pass.
  • Not from a review, but visible in the rows: the Staged checkbox sits about 2px below the row's center, from an existing top: 3px nudge. It did on main too, so it's left as is.

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 changelist's header row was 16px tall. Each header's sort button,
the role=button div axe measures, was 13px tall (Staged 41x13, Status
51x13) inside the cell's 1px/2px padding, and axe gave Staged and
Status a safe clickable space of 17px. The button now fills its cell
with that padding moved inside it, and is 24px tall: Staged 45x24,
Status 55x24, in a 25px header row (24px plus its bottom border). The
sort arrow stays centered (y=8-16 of the 24px button).

The style is shared with the Review Changes window's changelist, whose
headers are now 24px tall as well.

The e2e test scans the header row with axe's target-size rule and fails
on violations or Needs Review results, since the buttons have
tabindex=-1. On main's CSS it fails, listing the Staged, Status, and
Path headers (13px tall, 17px safe space); with this change it passes.

Addresses #19786
Changelist rows were 18px tall, so neighboring rows' staging checkboxes
(15x15) and go-to-change buttons (12x10) were 18px apart. axe reported
each go-to-change button as Needs Review with a 12px safe clickable
space once several files were listed. It doesn't count the checkboxes,
which are images with role=checkbox, as targets, but their 24px circles
overlapped the same way. Rows are now 24px, so both are 24px apart and
pass by spacing.

Each row's contents move down 3px together, keeping their alignment
with the file name: in a row, the text spans y=5-19 (was 2-16), the
checkbox 6.3-21.3 (was 3.3-18.3), and the go-to-change button 8.3-18.3
(was 5.3-15.3). The style is shared with the Review Changes window and
the SVN pane, whose rows are 24px as well.

The e2e test now scans the whole table, checks that it measured the
go-to-change buttons, and checks that neighboring checkbox centers are
at least 24px apart. With only the header fix, it fails listing five
go-to-change buttons; with this change it passes.

Addresses #19786
The sort button had a fixed 18px content height, and its th has
overflow: hidden, so a label that wrapped to a second line would be
cut off. Before the 24px change the button grew with its content.
min-height keeps the 24px target as a minimum. The English and French
labels are single words and don't wrap, so headers are unchanged:
Staged 45x24, Status 55x24 before and after.

Addresses #19786
Opening the project writes .gitignore, and its row arrives with a later
status refresh that redraws the table. The test waited only for c.R's
row, so the axe scan could run during that redraw. It now waits for
the .gitignore row first. The file's opening comment is also cut to
the reasons for the test's approach; the old sizes are in the commit
messages.

Addresses #19786
The entry said buttons in the Files and Git panes' file lists were
fixed. The Files list has no such buttons, and the Git pane's
go-to-change buttons are new in this release, so they don't belong in
a fix entry. The SVN pane shares the changelist style, so its headers
and checkboxes changed too. The entry now reads "the column headers and
checkboxes in the Files, Git, and SVN panes' file lists".

Addresses #19786
The comment said the changelist styles its headers through
.cellTableSortableHeader rather than .cellTableHeader because every
changelist column is sortable. The go-to-change column isn't sortable,
and ChangelistTableCellTableStyle.css themes every header through
.cellTableHeader: color from .rstudio-themes-dark, background and
border from the three flat-theme rules. The comment now says only that,
with the reason the commit list uses one rule. Comment-only change.

Addresses #19786
The #19786 entry said checkboxes were fixed in the SVN pane's file
list, which has no checkbox column; SVN's staging checkboxes are in the
SVN Commit dialog. The entry now reads "the column headers and
checkboxes in the Files pane's file list and in Git and SVN's lists of
changed files", which covers the Git pane, Review Changes, the SVN
pane, and the SVN Commit dialog without naming a pane wrongly.

Addresses #19786
Comment thread NEWS.md Resolved
The padding: 0 reset applied to every changelist header, but only a
sortable header's role=button div puts padding back. A non-sortable
header with visible text would have sat flush against the cell edge.
The reset now applies to sortable headers only. Measured in the Git
pane: the go-to-change header's padding is 1px 2px (was 0), the
sortable headers are unchanged (Staged 45x24, Status 55x24), and the
header row is still 25px.

Addresses #19786
The test waited for the .gitignore row that RStudio writes when the
project opens, which tied a target-size test to unrelated product
behavior. The seed now writes a .gitignore that ignores .Rproj.user.
augmentGitIgnore (SessionGit.cpp) then has nothing to add, since no
Posit Assistant state directory or package output exists in the
project, so the first status lists every file and the test waits on
c.R, a file it seeded.

Addresses #19786
A selected row also matches the base sheet's .cellTableSelectedRow
{ height: auto }, which has the same specificity as the changelist's
24px row rule and loses only by coming earlier in the combined sheet.
The test scanned with no row selected, so it would have passed if that
order changed. It now selects b.R before the scan and the checkbox
spacing check, confirming the selection by the row's background, since
CI builds obfuscate class names.

With a .cellTableSelectedRow { height: auto } rule placed after the
row rule, the test fails, listing the go-to-change buttons in and
beside the 18px selected row. Without it, it passes.

Addresses #19786
The toolbar, Files list, and Git changelist target-size tests each had
their own copy of describeNode and of the "violations plus Needs
Review, expect none" assertion. utils/a11y.ts now exports
expectNoFindings, which the three tests use; the assertion and its
message are unchanged. All three tests pass on Server.

Addresses #19786
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

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

Passed Failed Skipped Flaky
5968 0 285 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1499 0 49 0
✅ desktop-macos 1475 0 74 0
✅ desktop-windows 1494 0 60 0
✅ server-linux 1448 0 54 1
✅ setup 48 0 32 0

View report online


All platforms - commit 8a1f3a25ba0ded1d51f92a931e45882217637944 - Run #2559

@gtritchie
gtritchie merged commit 0faf0fe into main Nov 30, 2026
45 checks passed
@gtritchie
gtritchie deleted the bugfix/git-grid-target-size branch November 30, 2026 23:14
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