React Aria Table: ArrowRight on a column header scrolls the page instead of moving focus
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
Repro steps
- 1.Open the reproduction page. The table is below the 'Start here' button and a fixed dark banner sits at the top.
- 2.Move focus into the table so a body cell is focused (debug bar shows focused TD).
- 3.Press ArrowUp to move focus into the header row.
- 4.Press ArrowRight repeatedly to move through the header until the table must scroll horizontally.
- 5.Observe pageY and the header row visibility in the debug bar and viewport.
Expected
Moving focus right through the header should only scroll the table horizontally (tableX). pageY should stay at 0 and the header row should remain visible.
Actual
After the third ArrowRight, the table scrolled horizontally to tableX 762 and the page also scrolled vertically to pageY 361. The page heading and the table header row are out of view, while focus is still on a header Resizer. pageY stays at 361 through the end of the recording, including after ArrowLeft moves tableX back to 508. Also, ArrowUp put focus on the Column 1 column resizer, not on a header cell.
Evidence
Issue markdown (copy-paste ready)
## Summary
In a raw react-aria-components Table, moving focus horizontally through the header with ArrowRight scrolls the table horizontally and also scrolls the page vertically by 361px. The header row ends up hidden. ArrowUp from a body cell also lands focus on a column Resizer instead of a header cell.
## Environment
- Chromium 151.0.7922.34, macOS
- Viewport 1280x720, DPR 1
- Page: React Aria table focus scroll reproduction (`/`)
## Steps to reproduce
1. Open the reproduction page (0.0s).
2. Move focus into a body cell. The debug bar shows `focused: TD` (5.0s).
3. Press ArrowUp (5.4s).
4. Press ArrowRight repeatedly (8.6s, 9.4s, 10.2s) until horizontal scrolling is needed.
## Expected
Only `tableX` changes. `pageY` stays 0 and the header row stays visible.
## Actual
- 7.0s: ArrowUp focused the Column 1 resizer (`focused: Resizer`), not a header cell.
- 9.0s: Focus moved to the Column 2 resizer with no scroll. This step works.
- 11.0s: `pageY: 361, tableX: 762, headerTop: 0`. The page scrolled vertically and the header and heading are out of view.
- 11.2s to 15.0s: Another ArrowRight produced no visible change.
- 17.0s: ArrowLeft brought `tableX` back to 508, but `pageY` stays 361 and the header stays hidden until the end (20.8s).
## Evidence
- Debug bar at 0.0s: `{pageY:0, tableX:0, tableY:0, headerTop:0, focused:BODY}`
- Debug bar at 11.0s: `{pageY:361, tableX:762, tableY:0, headerTop:0, focused:Resizer}`
- Debug bar at 20.8s: `{pageY:361, tableX:508, tableY:0, headerTop:0, focused:Resizer}`
## Suggested area
Table header keyboard navigation and scroll-into-view handling for focused column resizers. Check how the fixed top banner and the header offset are accounted for.
*Recorded with SceneRecap.*This report was written by SceneRecap from a screen recording. Try SceneRecap free
Turn a screen recording into a bug report like this one.
Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.
Try SceneRecap free →