Skip to content

Controls are smaller than the WCAG 2.2 minimum target size and too closely spaced #19786

Description

@gtritchie

Many controls, mostly toolbar buttons but also the Files pane breadcrumb and file list, are smaller than 24×24px and too close to their neighbors to meet WCAG 2.5.8 Target Size (Minimum). Toolbar buttons are 21px tall, and icon-only buttons are 14–20px wide, so they rely on the spacing exception. Wherever icon buttons sit next to each other or to a split-button arrow, they fail it.

Axe DevTools mostly doesn't report these as violations. Since the toolbar roving tabindex (#5960), every toolbar button except the current one has tabindex="-1". For an undersized target with a negative tabindex, axe-core reports "Needs Review" ("Element with negative tabindex has insufficient size… Is this a target?") instead of a violation. WCAG 2.5.8 is about pointer targets, so tabindex doesn't change whether these fail.

Examples

Measured with axe-core 4.13's target-size rule in Chromium on RStudio Server, default layout. "Safe space" is the diameter of the clear circle around each target that axe reports; it must be at least 24px.

Toolbar Button Size Safe space axe result
Environment Refresh the list of objects 16×21 4px Needs Review
Environment Refresh options (split-button arrow) 5×21 5px Needs Review
Environment List/Grid view menu 53×21 20px Needs Review
Environment (second row) Language menu ("R") 21×21 — Violation
Files File display settings 30×21 18px Needs Review
Files Upload, Delete, More 58–61×21 23px Needs Review
Console Find in Console 14×21 18px Needs Review
Console Clear console 20×21 18px Needs Review
Main Open recent files (split-button arrow) 5×21 — Needs Review
Files New Folder 84×21 ~20px Size undetermined
Files (breadcrumb) Go to project directory 20×22.5 20px Violation
Files (breadcrumb) Go to directory ("...") 20×20 17.2px Violation

Icon buttons with enough space around them pass through the spacing exception, e.g. most of the main toolbar's 20×21 buttons and Clear objects from the workspace.

The Clear console and New Folder buttons' 24px-tall content tables also spill out of their 21px buttons, which is why axe reports that it can't determine those buttons' sizes. New Folder is wide enough but too short: the Files tab is 9.9px above its center and the breadcrumb's ~ link 11.5px below.

The breadcrumb's project and "..." buttons share a 42px-wide frame at the right end of the breadcrumb, so both need more room, not just a bigger box.

Files list

The Files pane's file list has the same problem in its header and rows.

Target Size Safe space axe result
File type column header (sorts by type) 21×13 (cell 26×19) 20px Needs Review
Row selection checkboxes 13×13 21px Needs Review

The header row is 19px tall and file rows are 22.5px, so neither fits a 24px target. Clicking anywhere in a header cell sorts, since GWT's AbstractCellTable treats the whole <th> as the header, but the 26×19 cell is still too short, with the breadcrumb 10px above the File type header's center. Adjacent row checkboxes are 22.5px apart, so their 24px circles overlap; enlarging each checkbox's hit area to fill its 30×22.5 cell wouldn't be enough without taller rows.

Steps to reproduce

  1. Run an Axe DevTools WCAG 2.2 AA scan.
  2. Look under "Needs Review" for "All touch targets must be 24px large, or leave sufficient space".

Or inject axe-core and run the rule directly (it's disabled by default):

axe.run(document, {
  runOnly: { type: 'rule', values: ['target-size'] },
  rules: { 'target-size': { enabled: true } }
})

Related: #19782 (pane Minimize/Maximize/Restore buttons, which have tabindex="0" and so were reported as violations).

Activity

  1. added theissue type on Nov 21, 2026
  2. self-assigned this
    on Nov 21, 2026
  3. gtritchie commented on Nov 23, 2026

    @gtritchie
    MemberAuthor

    Another one to cover: the clear (×) button that search boxes show once you type is 11×11. In the main toolbar's Go to File/Function box, axe-core 4.13 reports it as a violation (not Needs Review): "Target has insufficient size (11px by 11px)" and a safe clickable space of 11px.

    It comes from the shared search widget (SearchWidget.ui.xml, an ImageButton with the clearSearch class), so the same button appears in the other toolbar search boxes, such as the Environment and Help panes.

  4. gtritchie commented on Nov 24, 2026

    @gtritchie
    MemberAuthor

    Another one to cover: the Files pane's "..." (Go to directory) button, at the right end of the path breadcrumb, is a 20×20 target. It sits at the top of the 24px path toolbar, beside breadcrumb links that are now 24px tall. axe-core 4.13 reports it as Needs Review: "Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of 17.2px instead of at least 24px."

    It comes from PathBreadcrumbWidget (a Button with the browse class in FileDialogStyles.css, width: 20px; height: 20px), which the file dialogs share.

  5. gtritchie commented on Nov 24, 2026

    @gtritchie
    MemberAuthor

    Another one to cover: the narrow dropdown arrows of split buttons, such as the main toolbar's Open button and its recent-files arrow (#rstudio_open_mru_menubutton). The arrow is a 5×21 target. axe-core 4.13 reports it as Needs Review: "Element with negative tabindex has insufficient size (5px by 21px, should be at least 24px by 24px)" and a safe clickable space of 9.2px. Their design and target size are to be addressed separately from #19798.

    #19798 leaves the arrow's size alone, but Open is now a 24px box, so the arrow sits closer to it. The arrow's box now touches Open's box, where there was a 4px gap. The arrow's center moved from 6.5px to 2.5px from Open's box. The visible gap from the Open icon to the arrow went from 4px to 2px.

  6. changed the title [-]Toolbar buttons are smaller than the WCAG 2.2 minimum target size and too closely spaced[/-] [+]Controls are smaller than the WCAG 2.2 minimum target size and too closely spaced[/+] on Nov 26, 2026
  7. 26 remaining items

  8. gtritchie commented on Dec 1, 2026

    @gtritchie
    MemberAuthor

    Another one to cover, on Windows only: two toolbar search boxes' text inputs are too close to a neighboring button. The input is 15px tall, so it passes only through the spacing exception, and body.windows .search { transform: translateY(-1px); } (themeStyles.css, from #19163) lifts the box just enough to break that. axe-core 4.13 reports both as Needs Review: "Target has insufficient space to its closest neighbors."

    Pane Input Size Closest neighbor Safe space
    Environment Search environment 76×15 List/Grid view menu (#rstudio_mb_object_list_view, 57×24) 23px
    Help Find in Topic 80×15 Show in new window (#rstudio_tb_helppopout, 24×24) 23.2px

    Measured on RStudio Server in Chromium on macOS, by adding the windows class to body. Applying only the 1px transform gives the same results, and without it both inputs pass. Not yet confirmed on Windows itself. After a box's first focus its input is stretched across the whole box (122px and 93px wide), and Find in Topic then reports 23.4px.

    This isn't caused by the search clear (×) button: Find in Topic has no clear button, and both inputs are reported with the boxes empty.

  9. gtritchie commented on Dec 3, 2026

    @gtritchie
    MemberAuthor

    Status of the items above:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions