Table: support column header navigation when empty
Provide a general summary of the feature here
UPDATE: Summary of issue is that columns may contain menus with filters that end up with an empty table. Users need to be able to access those menus when the table is empty to clear the filter and bring back content. See https://github.com/adobe/react-spectrum/issues/10121#issuecomment-5721063368 for possible direction
--Historical issue contents--
With roving tabIndex, first Tab into <Table> uses useSelectableCollection + GridKeyboardDelegate.getFirstKey(), which targets the first body row/cell. Apps that need first Tab on columnheader (sortable headers, WCAG patterns) must manually fight focusedKey, grid tabIndex={0}, and per-cell tabIndex overrides.
Expected Behavior?
Prop such as initialFocusTarget="firstColumnHeader" (or autoFocus="firstHeader") that sets initial focusedKey to the first column and moves DOM focus accordingly.
Current Behavior
On the first Tab into a RAC <Table>:
While focusedKey is null, the [role="grid"] gets tabIndex={0}.
onFocus calls getFirstKey(), which picks the first body row (and with focusMode: 'cell' — the first body cell). Column headers are not used as the initial target.
Items get tabIndex={0} only when their key matches focusedKey; everything else is -1.
There is no prop to start Tab on the first columnheader, and
Source: adobe/react-spectrum