Repository navigation
Make the Git changelist's headers and rows 24px targets (WCAG 2.5.8) - #19840
Merged
Merged
Conversation
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
gtritchie
commented
Nov 30, 2026
gtritchie
commented
Nov 30, 2026
gtritchie
commented
Nov 30, 2026
gtritchie
commented
Nov 30, 2026
gtritchie
commented
Nov 30, 2026
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
RStudio E2E - all platformsAll tests passed!
All platforms - commit |
This was referenced Dec 1, 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.
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.min-heightrather thanheight, 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 base1px 2pxpadding.Also corrects a pre-existing comment in
CommitListTableCellTableStyle.cssthat 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.gitignorethat 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'starget-sizerule on the changelist, and fails on any violation or Needs Review result, since the targets havetabindex=-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.main's CSS it fails, listing the Staged, Status, and Path headers..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
expectNoFindingsinutils/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/playwrightopens a page that Desktop's CDP connection to Electron refuses. The existingchangelist_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-reviewand roborev passes that were not changed, and why:top: 3pxnudge. It did onmaintoo, so it's left as is.Documentation
N/A
Checklist
NEWS.md