Skip to content

Expose Git/SVN changelist checkboxes, status icons, and table to screen readers - #19343

Merged
gtritchie merged 5 commits into
mainfrom
bugfix/changelist-checkbox-a11y
Oct 29, 2026
Merged

gtritchie merged 5 commits into
mainfrom
bugfix/changelist-checkbox-a11y

Conversation

@gtritchie

@gtritchie gtritchie commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #19328.

The Git and SVN changelists (Git pane, Review Changes window, SVN pane, SVN commit dialog) were unreadable by screen readers:

  • Staged / Commit checkboxes. TriStateCheckboxCell rendered a bare <img alt="">. The image now has role="checkbox", aria-checked (true, false, or mixed for a partially staged file), and an aria-label from a labeler the table supplies: "Stage " for Git, "Commit " for SVN. The empty alt is removed, since ARIA in HTML allows alt="" only on presentational images. The contrast-theme glyph classes from Image-based checkmarks ignore Windows contrast themes #18494 are unchanged.
  • Status icons. The icons had empty alt text, and the description ("Modified", "Added/Modified", ...) was only the title of the enclosing span. That span is now role="img" with the description as its aria-label, via a shared ChangelistTable.statusOpenTag used by both renderers. An untracked Git file is described as "Untracked" instead of "Untracked/Untracked", in the tooltip too.
  • Table name. The table is labeled "Changed files", or "Files to commit" in the SVN commit dialog.

New strings have English and French translations.

Tests

  • TriStateCheckboxCellTests (GWT unit) checks the role, aria-checked, aria-label, and absence of alt for all three states.
  • New Playwright test e2e/rstudio/tests/panes/git/changelist_checkbox_a11y.test.ts sets up partially staged, staged, and untracked files and checks the table name, each checkbox's name and state, each status icon's name, and that clicking a checkbox stages the file. Passes in test:server-dev.
  • The SVN tables were not verified by hand.

Known issues

The SVN commit dialog still has no keyboard way to toggle a file's checkbox. Git is already keyboard operable (Space/Enter toggles staging for the selected rows).

The table in general does not support keyboard operation. That is tracked separately.

TriStateCheckboxCell rendered a bare <img alt="">, which screen readers
skip. It now carries role="checkbox", aria-checked (true, false, or mixed
for a partially staged file), and an aria-label naming the file: "Stage
<path>" in the Git pane and Review Changes window, "Commit <path>" in the
SVN commit dialog. The empty alt is dropped, since it marks the image
presentational.

Addresses #19328
The status icons had empty alt text and their description lived only in
the span's title, which screen readers do not reliably read. The span is
now role="img" with the description as its aria-label, built by a shared
ChangelistTable.statusOpenTag used by both renderers. An untracked Git
file ("??") is described as "Untracked" instead of "Untracked/Untracked".

Addresses #19328
The existing tests called the removed one-argument constructor, so the
GWT unit tests no longer compiled. They now pass a labeler, and new
tests check role, aria-checked (true/false/mixed), aria-label, and the
absence of alt for each state. Also tightens two comments.

Addresses #19328
The changelist table had no accessible name. It is now "Changed files"
in the Git pane, the Review Changes window, and the SVN pane, and "Files
to commit" in the SVN commit dialog, whose checkboxes select files for
the commit.

Addresses #19328

@gtritchie gtritchie left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Four findings. Keyboard operability of the checkboxes is known and out of scope, so it isn't listed.

# Finding Origin
1 Conflicted files are named "Unmerged/Unmerged" Pre-existing tooltip text; this PR makes it the accessible name and de-duplicates only ??
2 "Stage <path>" checkbox stages every selected row on mouse click Pre-existing behavior; the new per-file name makes it inaccurate
3 statusOpenTag's empty-description branch and the SVN labels are untested Introduced by this PR
4 "Modified/Modified" doesn't say which half is staged Pre-existing tooltip text, newly the accessible name (suggestion only)

return "";

// Git reports untracked files as "??"; both halves mean the same thing.
if (str.equals("??"))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicted files are still named "Unmerged/Unmerged". Pre-existing in the tooltip; this PR makes it the accessible name and fixes the doubling only for ??.

SessionGit.cpp:627 passes the raw porcelain status through, so a both-modified conflict arrives as UU, and both halves map to unmergedCapitalized(). Handling UU alongside ?? covers it. AA/DD ("Added/Added", "Deleted/Deleted") do carry "both sides" information, so those can stay.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 489f727: UU is now described as "Unmerged", in the tooltip and the accessible name. AA and DD keep both halves.

final Column<StatusAndPath, Boolean> stagedColumn = new Column<StatusAndPath, Boolean>(
new TriStateCheckboxCell<>(selectionModel_))
new TriStateCheckboxCell<>(selectionModel_,
item -> constants_.stageFile(item.getPath())))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkbox is named for one file, but a mouse click can stage every selected row. Pre-existing behavior; the new per-file name makes it inaccurate.

With a.R, b.R and c.R selected, mousing over a.R's checkbox sets mouseInCheckbox_, so isEditing() returns true. AbstractCellTable then fires the CellPreviewEvent with cellIsEditing=true, DefaultSelectionEventManager leaves the selection alone, and the FieldUpdater (line 80) fires StageUnstageEvent(!value, getSelectedItems()): all three files are staged by the control named "Stage a.R".

A screen reader activation sends a click without a mouseover, so the selection collapses to that row first and only that file is staged. In practice this mostly affects mouse and voice-control users ("click Stage a.R").

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this as is: a mouse click has always staged the whole selection, and changing what a click stages is a behavior change, not part of this labelling fix. Screen-reader activation stages only the named row. This could be its own issue.

public static SafeHtml statusOpenTag(String desc)
{
String cls = resources_.cellTableStyle().status();
if (StringUtil.isNullOrEmpty(desc))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No test covers this branch, the SVN labels, or the Review Changes table. Introduced by this PR.

The empty-description branch can be reached: SVNStatusRenderer has an image for status ' ' (statusNone) but an empty description. A regression here (e.g. role="img" with an empty aria-label), or in "Files to commit" / "Commit <path>", would pass CI: TriStateCheckboxCellTests covers only the cell, and the e2e test only the Git pane. A GWT unit test of statusOpenTag for empty and non-empty descriptions would cover the first part.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not adding tests here. The empty-description case produces the old markup minus an empty title (no role, decorative icon), so a unit test would only pin that if. Covering the SVN labels would mean an SVN-backed e2e setup, which costs more than the strings are worth.

"title=\"" +
SafeHtmlUtils.htmlEscape(descForStatus(str)) +
"\">"));
builder.append(ChangelistTable.statusOpenTag(descForStatus(str)));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: "Modified/Modified" doesn't say which half is staged. Pre-existing tooltip text, newly the accessible name.

For MM or AM a screen reader user hears "Modified slash Modified" or "Added slash Modified". Sighted users can tell staged from unstaged by the icons' column positions. Something like "Staged: Added, unstaged: Modified" would carry the same information. Not blocking: the mixed checkbox state already signals a partial stage.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferring. The text is the existing tooltip, and the "mixed" checkbox state already tells a screen reader user the file is partly staged. Rewording would change the tooltip for sighted users too, so it fits better in a separate change.

Both halves of "UU" mapped to the same description, so a conflicted
file's tooltip and accessible name read "Unmerged/Unmerged". It now
reads "Unmerged", as "??" reads "Untracked". "AA" and "DD" keep both
halves.

Addresses #19328
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

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

Passed Failed Skipped Flaky
4604 0 230 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1152 0 43 0
✅ desktop-macos 1157 0 38 1
✅ desktop-windows 1151 0 50 0
✅ server-linux 1092 0 51 0
✅ setup 48 0 32 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit 489f727875bf9c1c6b9eee29e10f5ab95f26b7ad - Run #1811

@gtritchie
gtritchie merged commit 509a476 into main Oct 29, 2026
53 checks passed
@gtritchie
gtritchie deleted the bugfix/changelist-checkbox-a11y branch October 29, 2026 17:56
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.

Git/SVN changelist checkboxes are not exposed to screen readers

1 participant