Repository navigation
feat(dashboard): reach file viewer header path by keyboard, not only hover - #9301
Conversation
|
Intent: Give the file viewer header's full path the same keyboard-focus and screen-reader route it already has for pointer hover, so a keyboard-only user can disambiguate same-named files. |
Design Review (Fable 5) — ✅ PASSDesign-level review of All precedents check out — CodeBlock/FileRenderers use the same focusable read-only region pattern, the capture harness and Design-Verdict: PASS A real pointer-only gap closed at the right layer, mirroring the repo's existing focusable-region pattern, with the contract pinned by unit tests. Suggestions
[DESIGN-REVIEWED] 8645246 |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of The change is narrow: the existing breadcrumb becomes keyboard-focusable with a focus ring and a focus-only full-path readout. Reconciling the blind read against the diff: the reader correctly identified the breadcrumb ("the file's name and the folders it lives in"), the focus ring ("the app showing me this part is currently selected, the way things light up when you press Tab"), and the readout ("a pop-up tip telling me the file's full address... since the short trail above can't show it all") — all matching exactly what the diff implements. The "blank rounded square" the reader could not identify is a capture-harness placeholder ( One genuine data point survives: the reader could not tell whether the truncated trail was "skipping some steps" or the file really sits in duplicate folders — the trail gives no sign it is elided. UX-Verdict: PASS Blind reader correctly understood the focus ring and full-path readout unaided; every added state is screenshotted in both themes and widths. Suggestions
[UX-REVIEWED] 8645246 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of
First-Principles-Verdict: PASS A pointer-only path made keyboard/screen-reader reachable; every item is declared, derived from a browser rule, and matches a counted repo convention. What this change shipsIntent: let a keyboard or screen-reader user read the file viewer's full path, which today lives only in a hover tooltip. This is a FIX (#7900).
Sibling instances of the same title-only defect on other chips are declared and deferred to #9312 with the count of overlap against #7935 addressed in the description, so no point-patch finding stands. [FIRST-PRINCIPLES-REVIEWED] 8645246 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
fa24e44 to
616fd93
Compare
self-added: yes |
616fd93 to
7fb4a3d
Compare
self-added: yes |
7fb4a3d to
5dc6dfc
Compare
self-added: yes |
…nly hover The file viewer header breadcrumb shows only the last three path segments; the full path was in a native title tooltip, which is pointer-only. Add a keyboard-focus and screen-reader route (tabIndex + role=group + aria-label) so a keyboard user can disambiguate same-named files. The label is the runtime path, so no i18n string is added.
5dc6dfc to
8645246
Compare
self-added: yes |
self-added: yes |
bolichen97
left a comment
There was a problem hiding this comment.
Tech Lead review — approved.
Accessibility correctness. The focus target is the real breadcrumb element, not a proxy: tabIndex={0} puts it in the tab order in DOM/visual order (icon → breadcrumb → diff badge → spacer → actions), so tab order stays coherent. role="group" takes its name from the author rather than from contents, so aria-label={filePath} names the region without hiding the visible crumbs from assistive tech. title is not used for the accessible name once aria-label is present, so the pointer route survives with no double announcement, and the sighted-keyboard readout is aria-hidden="true" so a screen reader is not told the path twice. focus-visible:ring-1 scopes the ring to keyboard focus. Three genuinely distinct routes, one per user class, no redundancy.
Scope. Real code is one component (+73/-13) plus its tests (+65/-1); the other ten files are the repo's own established evidence conventions (website/capture/, website/scripts/, temp-screenshots/). Nothing outside the stated surface, and the side-panel tab chip (#7935) is left alone.
i18n. No localized string is added and no locale catalogue is touched, correctly — the accessible name and the readout both ARE the runtime path, i.e. data, not UI copy. Automated Rule Check and Inclusive Language are green on this head.
Blocking findings. None outstanding. All five AI lanes are clean on 8645246a4 (GPT and Opus no findings; Design, UX and First Principles PASS), no inline comments, no CHANGES_REQUESTED. The six cancelled check-runs are superseded duplicates — every one has a same-named success run on this same sha, started 21s later. The two surviving lane suggestions are advisory: gating the readout on :focus-visible (a left-click currently also opens it, which is benign and arguably useful), and a muted elision crumb. Neither is a defect, and neither warrants added mechanism here.
The tests are a real ratchet, not a tautology: they assert focus actually lands (toHaveFocus), query by accessible name (getByRole('group', { name: fullPath })), and pin the blur teardown.
…nly hover (kirodotdev#9301) The file viewer header breadcrumb shows only the last three path segments; the full path was in a native title tooltip, which is pointer-only. Add a keyboard-focus and screen-reader route (tabIndex + role=group + aria-label) so a keyboard user can disambiguate same-named files. The label is the runtime path, so no i18n string is added.
Problem / Motivation
Open a file in the dashboard's right-hand file viewer. The path in the panel
header is a breadcrumb that shows only the last three segments of the path. A
deeply nested file -- for example a monorepo that nests the package name
twice, like
.../MyWorkspace/src/PackageName/src/PackageName/index.ts-- showsjust
src > PackageName > index.ts. The rest of the path lives in a nativetitletooltip on that breadcrumb.
A
titletooltip only appears on mouse hover. A keyboard user, or anyone usinga screen reader, has no way to read the full path: the element is not in the tab
order and carries no accessible name. So the one piece of information that
disambiguates two same-named files is reachable by pointer only.
Why it matters
Repos and workspaces are full of same-named files (
index.ts,config.json,AGENTS.md,SKILL.md). When the visible three segments are not enough, asighted mouse user hovers and reads the tooltip; a keyboard-only or screen-reader
user is stuck and has to go hunt for the path elsewhere. The header is meant to
tell you which file you are looking at, and for those users it silently does not.
What changed (motivation -> approach -> change)
The goal is to give the full path the same keyboard and screen-reader route it
already has for the pointer, without widening what is shown or adding a new
control.
The header already puts the full path on
title. The gap is purely that thebreadcrumb element is a plain, non-focusable container. So the fix keeps
title(the pointer route unchanged) and adds three attributes to the same element:
tabIndex={0}puts it in the tab order,role="group"makes it an addressableelement, and
aria-label={filePath}gives it the full path as its accessiblename. A keyboard user can now tab to the breadcrumb and their screen reader reads
the whole path; a
focus-visiblering shows where focus landed. A sighted keyboard-only user, who hears no aria-label and to whom anative
titledoes not open on focus, gets a small readout that prints the fullpath below the breadcrumb while it holds focus. This mirrors the
repo's existing focusable read-only regions (
CodeBlock.tsx,FileRenderers.tsx),including the same one-line eslint allowance they use.
The accessible name IS the runtime path -- data, not UI copy -- so no localized
string is added and no locale catalogue is touched. The breadcrumb markup is
factored into a small exported
FileHeaderBreadcrumbso the accessibilitycontract is unit-testable without mounting the whole panel (which pulls in the
editor tree). Right-click still opens the existing file-path menu.
"Full path" here means the absolute filesystem path. That is the string the
header already renders in its
titleand in its click-to-copy bar today, so thischange adds a keyboard route to an already-visible value rather than exposing
anything new. This is the local dashboard file viewer; the component does not
render in any shared or exported surface, so the absolute path (which can include
a home-directory name) is not newly disclosed anywhere.
Note the related PR #7935 targets a different surface -- the side-panel tab CHIP
-- and its own description says the header breadcrumb "already carries the full
path". This PR is about that header breadcrumb's keyboard/screen-reader
reachability, so the two do not overlap in behaviour.
Tests
website/src/test/MarkdownPanel.test.tsx-- a newFileHeaderBreadcrumbaccessibility block, three cases:
title(pointer route), while only the tail threesegments are visible text;
in the tab order (
tabindex=0), takes focus, and its accessible name (queriedby
getByRole('group', { name: fullPath })) equals the full path;accessible name.
Proven as a real ratchet: with the three production attributes removed, all three
new cases fail (
getByRole('group')finds nothing); with them present, all pass.Commands run locally, one file at a time:
tsc -bon this host reports 30 errors, all inLexicalComposerInput.tsx/PasteTokenNode.tsxand allCannot find module 'lexical'; they are identical ona pristine
origin/mainwith this change stashed (a missing dev dependency thishost cannot install), so none is introduced here. CI provides the real type-check.
Manual verification
Captured the real component in a header-bar mimic via a Playwright harness in
both themes and both states. The default frame shows the truncation; the focused
frame shows the new keyboard focus ring around the aria-labelled breadcrumb.
Default (dark) -- only the tail three segments are shown:
Keyboard focus (dark) -- the breadcrumb is focusable and shows a focus ring; its
accessible name is the full path:
Light theme (default + focus)
Narrow panel at 320px (SIDE_PANEL_MIN_W, the narrowest the viewer allows) --
the focus readout is bounded by the panel edge and wraps inside it, so the full
path stays fully readable rather than clipping off the right edge:
Diff mode -- the
+N/-Nbadge stays beside the filename (its original position;the readout is anchored to the header bar, so the header's own layout is
unchanged), at 460px and at the narrowest 320px:
Screenshots / video
See Manual verification above.
Related Issues
Related a11y follow-up (same defect class on other chips, tracked not fixed here): #9312
Closes #7900
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)