Skip to content

[focusgroupV2] Define coordinate topology for irregular grids #1495

Open

Description

@janewman

The initial Focusgroup V2 grid model is rectangular and spanless. Unequal row lengths and effective rowspan or colspan values greater than one invalidate the grid.

<table role="grid" focusgroup="grid" aria-label="Templates">
  <tr>
    <td tabindex="0">Blank</td>
    <td tabindex="0">Report</td>
    <td tabindex="0">Invoice</td>
  </tr>
  <tr>
    <td tabindex="0">Add template…</td>
  </tr>
</table>

This keeps the initial model deterministic, but excludes partial rows, merged cells, and sparse grids.

One possible extension is to preserve gaps as implicit empty coordinates. These coordinates would participate in topology and column calculations without becoming focus destinations. This differs from collapsing or skipping the missing positions when assigning coordinates.

We need to define:

  1. Whether gaps remain implicit coordinates or are removed from the coordinate space.
  2. Whether movement encountering an empty coordinate stops or searches farther in the requested direction.
  3. How wrap and flow interact with empty coordinates.
  4. How spans occupy coordinates and affect block-axis column preservation.
  5. Which coordinate represents a spanning cell for memory and focusgroupstart.

Authored ARIA should continue to describe accessibility semantics rather than configure focus topology.

Related:

Activity

  1. dmytrokirpa commented on Oct 22, 2026

    @dmytrokirpa

    I'd like to add a calendar use case for gaps: cells that should be skipped during navigation without being removed from the layout.

    I'm working on the headless Calendar in Fluent UI. Date pickers often have dates (or months, in a month picker) that can't be chosen: before a min date, after a max date, or blocked by the app. They have to stay visible so the 7-column layout holds, but the interaction we ship today, and that a lot of existing date pickers use, is that arrow keys skip them.

    <div role="grid" aria-label="Choose a month" focusgroup="grid manual">
      <div role="row" focusgrouprow>
        <button type="button" role="gridcell">January</button>
        <button type="button" role="gridcell" disabled>February</button>
        <button type="button" role="gridcell">March</button>
      </div>
      <div role="row" focusgrouprow>
        <button type="button" role="gridcell">April</button>
        <button type="button" role="gridcell">May</button>
        <button type="button" role="gridcell">June</button>
      </div>
    </div>

    Here I'd expect ArrowRight on January to go to March. Under the current explainer, February has no cell target, so the whole grid is invalid and arrow keys stop working everywhere in it. I tested this with the polyfill built from main.

    The explainer's recommendation is a stable focusable cell boundary, with the unavailable action disabled or marked focusgroup="none". That works, but it gives "focusable but not selectable", which is a different interaction from "skipped". I don't think either is wrong, but right now authors who need skipping can't use grid at all.

    Some questions I'd find useful to settle as part of the gaps work:

    1. Could a cell keep its coordinate for spatial purposes but be marked as "not a destination"? Possibly that's just a cell with no target, if the grid didn't become invalid because of it.
    2. If so, what should happen when the move lands on a gap? For a calendar, the natural answer is to keep going in the same direction (ArrowDown keeps going down the column until it finds a valid date), and stop at the edge if there isn't one. I'm not sure that's right for every grid, though.
    3. Does focusgroupstart or memory pointing at a cell that later becomes a gap need any special handling, or does it just fall back to the normal entry rules?
    4. More generally, does one cell without a target need to make the whole grid invalid? A disabled date doesn't seem like it should switch off navigation for the rest of the month.

    For now we're keeping Calendar navigation custom. Month-boundary movement and PageUp/PageDown would have to be custom anyway. I'd still like to be able to move to focusgroup later. The header side of this, weekday names and week numbers, is in #1496.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions