Skip to content

Make the file dialogs' path breadcrumb 24px targets (WCAG 2.5.8) - #19863

Merged
gtritchie merged 7 commits into
mainfrom
bugfix/file-dialog-breadcrumb-target-size
Dec 1, 2026
Merged

gtritchie merged 7 commits into
mainfrom
bugfix/file-dialog-breadcrumb-target-size

Conversation

@gtritchie

@gtritchie gtritchie commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Intent

Addresses #19786.

The path breadcrumb in file dialogs (Open File, Save As, Copy To/Move To, folder choosers) was still short of WCAG 2.5.8 Target Size (Minimum). #19798 and #19830 made the breadcrumb 24px tall only in the Files pane. In RStudio Server's Open File dialog, axe-core 4.13 reported these as violations:

Target Size Safe space
Go to project directory 24×20 22px
Go to directory ("...") 24×20 22px
Breadcrumb path links 65–75×22 22px

Approach

24px breadcrumb everywhere

  • The Files pane's 24px rules are now the breadcrumb's own, so they apply in file dialogs too. The links are 24px tall and at least 24px wide, and both buttons are 24×24.
  • The filePane style, which existed only to scope those rules, is removed.
  • The dialogs' breadcrumb frame is 4px taller (21px to 25px, including its top border), so each dialog grows by 4px. The Files pane is unchanged.
  • The Home and cloud home icons (18px tall) are centered on the 24px links. They sat 1px from the top, so their centers were 2px above the text's and the separator's (12px, measured on macOS). This also applies in the Files pane.
  • The text keeps its 4px top padding, which centers the letters with Lucida Sans (macOS). line-height: 24px set them 1.6px low, because the font's ascent is much taller than its descent. A comment records this.

Current folder hidden behind the buttons (existing bug)

  • When a project is open, adding "Go to project directory" widens the button area from 24px to 48px. DockLayoutPanel.setWidgetSize only schedules that layout, so setDirectory scrolled a long path to its end while the button area was still 24px wide.
  • The last 24px of the current folder's name were then hidden behind the buttons (20px before Make pane toolbar buttons 24px targets (WCAG 2.5.8) #19830). axe also counted the hidden link as covering the project button.
  • The layout is now applied immediately with forceLayout(). For a deep folder in the Open File dialog, scrollLeft was 69.5 of a possible 93, and is now 93.5.

Related: #19861, where the breadcrumb's buttons receive focus before its links. Its suggested fix, a flex layout in place of the DockLayoutPanel, would replace the forceLayout() call.

rstudio-pro: no changes are needed. Pro's file dialog code is the same as here. Its Open Shared Project dialog's "My Projects" tab uses the same file browser, and its breadcrumb grows 4px too. By reading the code, that tab's content goes from about 329px to 333px of its fixed 400px panel. Not checked running.

Automated Tests

Adds e2e/rstudio/tests/panes/files/file_dialog_breadcrumb_target_size.test.ts. It opens a project nested under long folder names, so the path overflows the breadcrumb on any server. It then opens the Open File dialog and checks two things:

  • axe-core's target-size rule reports no violations or Needs Review results for the dialog. It also checks that the scan measured both buttons and at least two links, so an empty scan can't pass.
  • The current folder's link ends within the breadcrumb, not behind the buttons.

Results:

  • Against main's CSS, it fails, listing the "..." button and the four breadcrumb links.
  • Without the forceLayout() fix, it fails with 24.2px of the current folder hidden.
  • With the whole branch, it passes.

Also run on Server (macOS dev build), all passing: toolbar_target_size, files_list_target_size, files_breadcrumb_fade, choose_folder_dialog, copy_to_destination_dialog, file_dialog_initial_focus, files_narrow_resize, and open_project_folder. It runs on Server only, like the suite's other axe tests. After merging main, the new test, toolbar_target_size, files_list_target_size, files_breadcrumb_fade and choose_folder_dialog pass again.

QA Notes

Checked on RStudio Server (Chrome, macOS): axe-core 4.13's target-size rule finds nothing in the Open File dialog's breadcrumb. With a project open, a deep folder's path is scrolled so the current folder ends just before the project button.

Not checked: Desktop, Windows, Linux, dark themes, and rstudio-pro.

To check by hand against a release build:

  • File > Open File: the path bar is 4px taller, and its links and buttons respond to clicks across their full height.
  • With a project open and the working directory set to a deep folder, File > Open File shows the current folder in full at the right end of the bar.
  • Save As, Files pane > More > Copy To… and Move…, and folder choosers have the same path bar.
  • The Files pane's path bar looks unchanged.

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

…hows

When a project is open, the breadcrumb adds its "Go to project directory"
button and widens the button area from 24px to 48px. DockLayoutPanel's
setWidgetSize only schedules that layout, so setDirectory scrolled the
path to its end while the button area was still 24px wide. A path too
long for the breadcrumb then had the current folder's last 24px hidden
behind the buttons (scrollLeft 69.5 of 93 for a deep folder in the Open
File dialog; 93.5 of 93 with this change). Apply the layout immediately.

Addresses #19786
The Files pane's breadcrumb links and buttons were made 24px tall by
rules scoped to a filePane class, so file dialogs kept a 20px
breadcrumb: "Go to project directory" and "Go to directory" were 24x20
and the links 22px tall, which axe reports as violations with 22px of
safe clickable space.

The 24px sizes are now the breadcrumb's own, in the Files pane and in
file dialogs, and the filePane class, which existed only for them, is
removed. Dialogs' breadcrumb is 4px taller (frame 21px -> 25px).

Adds a test that scans the Open File dialog with axe's target-size rule
and checks that the current folder isn't hidden behind the buttons.

Addresses #19786
The test relied on the sandbox path being too long for the breadcrumb.
On an external server whose rsession host lacks the local sandbox,
sandbox.dir falls back to dirname(tempdir()), such as /tmp, and the
project's path could fit, failing the overflow check. The project now
sits under two long folders, which with the project folder take about
670px of the breadcrumb's 452px.

Addresses #19786
.include(OPEN_FILE_DIALOG)
.withRules(['target-size'])
.analyze();
} finally {

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.

Nit: an exception thrown from this finally replaces the one from the try, so if the test fails while the dialog can't be closed, the report shows the toHaveCount(0) timeout instead of the real error. tests/a11y/open-file-dialog.test.ts avoids this by closing in a catch (close error only logged), rethrowing, and closing normally on the success path.

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 f316652: the test now closes the dialog in a catch that only logs a close failure and rethrows the original error, and closes normally on success, as open-file-dialog.test.ts does.

// The "Go to project directory" button shows only while a project is open.
const projectDir = `${sandbox.dir}/${OVERFLOW_PARENTS}/${PROJECT_NAME}`.replace(/\\/g, '/');
const rprojPath = `${projectDir}/${PROJECT_NAME}.Rproj`;
await executeInConsole(

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.

Nit: executeInConsole waits for the prompt but doesn't look for an R error, so if stopifnot(dir.create(...)) fails the .Rproj is silently never written and the test reports an unrelated 60s openProject timeout. executeInConsoleChecked (same module) would fail with the R error.

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 f316652: the setup uses executeInConsoleChecked, so a failed dir.create fails with the R error.

Comment thread NEWS.md
- ([#19746](https://github.com/rstudio/rstudio/issues/19746)): [Accessibility] Fixed an issue where the "Show Traceback" and "Rerun with Debug" text on a Console error didn't have enough contrast against the error's background in several light editor themes, including the default Textmate. With Textmate, contrast is now 5.4:1, up from 3.8:1.
- ([#19782](https://github.com/rstudio/rstudio/issues/19782)): [Accessibility] Fixed an issue where the Minimize, Maximize, Restore, and Close buttons on panes were too small to click easily. Each button is now a 24x24 pixel target, up from 14x14 on an open pane, 16x17 or 20x17 on the minimized Source and Console panes, and 16x24 or 20x24 on other minimized panes.
- ([#19786](https://github.com/rstudio/rstudio/issues/19786)): [Accessibility] Fixed an issue where some toolbar controls, and the column headers and checkboxes in the Files pane's file list and in Git and SVN's lists of changed files, were too small or too close to their neighbors to click easily. Toolbar buttons now highlight under the mouse pointer, which shows the two parts of a split button separately.
- ([#19786](https://github.com/rstudio/rstudio/issues/19786)): [Accessibility] Fixed an issue where some toolbar controls, the path bar in file dialogs, and the column headers and checkboxes in the Files pane's file list and in Git and SVN's lists of changed files, were too small or too close to their neighbors to click easily. Toolbar buttons now highlight under the mouse pointer, which shows the two parts of a split button separately.

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.

Nit: the PR also fixes a second user-visible bug that isn't mentioned here: with a project open, a long path in a file dialog had the end of the current folder's name hidden behind the path bar's buttons. The setWidgetSize call behind it dates from 2015, so released versions have it. Worth a sentence in this entry or a separate Fixed entry.

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 out: the effect is small (the last 20px of the current folder name, in a path long enough to scroll, with a project open), and the #19786 entry is already long. The PR description covers it.

height: 18px;
box-sizing: border-box;
min-width: 24px;
height: 24px;

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.

Nit (from reading the CSS, not checked running): in file dialogs the links grow from 22px (clipped to a 20px bar) to 24px but keep padding: 4px 6px 0 11px (2px top under body.windows), so the added height all lands below the text: about 4px above and 7px below, where it was 4px and 3px. The center left separator also moves 1px down relative to the text. Worth a look at the Open File dialog on Server, and on Windows; if it reads as off-center, centering with line-height or flex instead of top padding would fix it.

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.

Checked running on Server (macOS). The 4px above / 7px below is the line box. The visible letters are centered: Lucida Sans has an 11px ascent and a 2px descent, so the ink center is 12.1px of the 24px link. Centering with line-height: 24px moved them 1.6px low, so I kept the padding and added a comment saying why (37dc751). The separator is centered at 12px, level with the text. What was off was the Home and cloud home icons, 1px from the top (center 10px), now centered (12px) in the same commit. The body.windows 2px rule is unchanged; Windows fonts are not checked.

Closing the dialog in a finally block meant a close failure replaced
the test's own error. It now closes in a catch that only logs a close
failure and rethrows, as open-file-dialog.test.ts does, and closes
normally on success.

The project setup used executeInConsole, which doesn't look for an R
error, so a failed dir.create showed up as a 60s openProject timeout.
executeInConsoleChecked fails with the R error instead.

Addresses #19786
The Home and cloud home icons (18px tall) sat 1px from the top of the
24px links, their centers at 10px, 2px above the text's and the
separator's (12px, measured on macOS). They are now centered, at 12px.

The text's 4px top padding stays: with Lucida Sans it centers the
letters (ink center at 12.1px). Centering the line box with
line-height: 24px was tried and set them 1.6px low, so a comment now
records why the padding is there.

Addresses #19786
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

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

Passed Failed Skipped Flaky
5980 0 274 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1498 0 49 1
✅ desktop-macos 1486 0 63 0
✅ desktop-windows 1494 0 60 0
✅ server-linux 1450 0 54 0
✅ setup 48 0 32 0

View report online


All platforms - commit 37dc751eda1433d7559410a7c073a4143c7bcff0 - Run #2578

@gtritchie
gtritchie merged commit 3c2bfd4 into main Dec 1, 2026
53 checks passed
@gtritchie
gtritchie deleted the bugfix/file-dialog-breadcrumb-target-size branch December 1, 2026 21:36
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