Repository navigation
Description
Follow-up to #18494.
System details
RStudio Edition : Desktop or Server
RStudio Version : all current releases
OS Version : any
R Version : any
Describe the problem in detail
The Staged checkbox in the Git pane and Review Changes window, and the checkbox column of the SVN changelist, is drawn by TriStateCheckboxCell as a bare <img alt=""> (src/gwt/src/org/rstudio/core/client/cellview/TriStateCheckboxCell.java, render()). It has no role, no checked state and no name, so a screen reader treats it as a decorative image and skips it. A screen reader user cannot tell whether a file is staged, or that the cell is a control at all.
The cell has three states -- staged, unstaged, and partially staged (null) -- so the indeterminate state needs to be conveyed too.
Expected
Each changelist checkbox is announced as a checkbox with its state (checked, not checked, or mixed for a partially staged file), and a name that identifies the file, e.g. "Stage R/foo.R".
Notes on fixing
- Native
<input type="checkbox">withindeterminateset from script, orrole="checkbox"witharia-checked="true|false|mixed"on the existing element. - The accessible name needs the file path, which the cell does not currently receive;
AriaLabeledCheckboxCelltakes aLabeledBooleanfor this reason. - Keyboard operation of the column within the cell table should be checked at the same time:
onBrowserEventacts only on events whose target is the<img>. - Image-based checkmarks ignore Windows contrast themes #18494 tags this
<img>withrstudio-forced-colors-glyphclasses so Windows contrast themes can redraw it. If it is replaced with a different element, carry those over or drop the matching rules inthemeStyles.css.
Also: the Status column
The Status column's icons (GitStatusRenderer, SVNStatusRenderer) have the same problem. Each icon is an <img alt>, and the status description ("Modified", "Added/Modified", ...) exists only as the title of the enclosing <span>, which screen readers do not reliably read. The description should be the icons' accessible name, e.g. role="img" with an aria-label on that span.
Also: the table has no name
The changelist <table> itself has no accessible name, so it is announced only as "table". It should be named for its contents: "Changed files" in the Git pane, the Review Changes window, and the SVN pane, and "Files to commit" in the SVN commit dialog, where the checkboxes select files for the commit.
Activity
Describe a "UU" Git conflict as "Unmerged"
Expose Git/SVN changelist checkboxes, status icons, and table to scre…