Skip to content

fix(pat-contentbrowser): improve keyboard navigation and upload focus - #1669

Open
MrTango wants to merge 2 commits into
masterfrom
pr/contentbrowser-keyboard
Open

MrTango wants to merge 2 commits into
masterfrom
pr/contentbrowser-keyboard

Conversation

@MrTango

@MrTango MrTango commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Make the content browser usable from the keyboard and retain focus during uploads.

Tab → current item in each column → toolbar
Arrow keys → navigate items
Upload → focus Browse → focus Upload when Browse hides
Escape → close browser → return focus to opener

Evidence

  • Before (code path): Item handlers prevent Tab, toolbar keydowns trigger actions indiscriminately, and hiding Browse loses focus.
    After: Only navigation keys are intercepted; native button activation and explicit focus handoffs are covered by regression tests.
  • pnpm test --runInBand: 60 suites passed; 518 tests passed, 15 skipped.
  • pnpm build:webpack: passed with size/performance warnings.
  • No manual browser verification in this pass.

Merge Danger

Door: two-way

Blast Radius: keyboard

Changes content-browser navigation and upload focus management.

Assisted-by: GPT 6.1 Sol

With maxFiles reached the Browse row is hidden. A keyboard user who just
chose a file there lost the focus to the page; it now moves on to the
Upload button.
- A content item swallowed every key, Tab included, so the focus could
  not leave the list. It now only answers the keys it handles.
- Each column is one tab stop, its current or first item, instead of a
  positive tabindex per item.
- The upload and home buttons fired on any keydown, Tab included. They
  act on activation only.
- Opening the upload form moves the focus to its Browse button.
- Escape closes the browser from anywhere inside it, and the closed
  browser hands the focus back to the button that opened it.
@MrTango
MrTango marked this pull request as ready for review November 13, 2026 08:07
@MrTango
MrTango requested a review from petschki November 13, 2026 08:07

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant