<!-- generated by scripts/gen-docs.mjs from docs/system/list-detail.md. Edit the source and rerun. -->
# List and detail

## Description
Shows a list and the row chosen in it: the detail stands beside the list on a wide screen and replaces it on a phone, with a way back, and the arrow keys move the choice.

`import { ListDetail, ListDetailItem, ListDetailList, ListDetailPanel } from "@/components/cobalt/ui/list-detail"`, source `registry/cobalt/ui/list-detail.tsx`, status `ready-with-gaps`.
Foundation: `hand-rolled (rows on Item, the keys on lib/use-row-keys, the content change on Crossfade, Previous and Next on IconButton)`. Traps checked: `trap/current-unmarked`, `trap/link-as-button`, `trap/narrow-hidden-nav`, `trap/list-dead-gap`, `trap/focus-ring-shape`, `trap/text-measure`, `trap/scroll-chain`, `trap/overlay-focus-return`, `trap/motion-frequent`, `trap/reduced-motion-ignored`, `trap/loading-layout-shift`.

`trap/current-unmarked` is answered by `aria-current` on the chosen row and the accent's soft fill (D46). `trap/link-as-button` by rows that are links when they have an address and buttons when they do not (Rules). `trap/narrow-hidden-nav` by the back control at the top of the detail below 640px. `trap/list-dead-gap` by rows that are the whole target. `trap/focus-ring-shape` by Item's outline on the row's 12px corner. `trap/text-measure` by titles cut at 151px, 183px from 768px, with the whole name in the tooltip (Limits). `trap/scroll-chain` by `overscroll-contain` on both parts. `trap/overlay-focus-return` by the back control returning focus to the row that was open. `trap/motion-frequent` by the plain crossfade of the detail and no motion on the list. `trap/reduced-motion-ignored` by Crossfade's reduced-motion config. `trap/loading-layout-shift` n/a: the part shows what the host passes and loads nothing itself; the detail keeps its header in place while its content changes (measured).

### Foundation
| Given by the foundation | Added by the team |
|---|---|
| `Item` from `registry/cobalt/ui/item.tsx`: the row, its fill under the pointer, the accent's soft fill when `aria-current`, the outline after Tab | `ListDetailItem`: a link with `href` or a button without, carrying its `value`; a press with a modifier on a link opens a tab and chooses nothing |
| `useRowKeys` from `registry/cobalt/lib/use-row-keys.ts`: j, k and the arrows, never in a field, a menu or an open overlay | Side by side, the keys move the choice, focus following it when it was on a row; narrower, they move focus between rows and Enter opens one |
| `Crossfade` from `registry/cobalt/ui/crossfade.tsx` | The detail's content fades in over the last row's and starts at its top, under a header that stays |
| Not applicable: hand-rolled. The two parts and the switch between them | The frame reads its own width (a container, `@container/list-detail`, and a ResizeObserver): from 40rem a 256px list beside a card for the detail, 288px from 48rem, narrower one view at a time; the detail's heading takes focus when it replaces the list, and Back returns focus to the row; Previous and Next disabled at the ends and kept focusable; a placeholder for a wide layout with nothing chosen |

## Examples
Filings to review: the chosen one opens beside the list, j, k and the arrows move through them, and below 640px a filing opens on its own with a way back to the list.

Real uses, 0 call sites (`rg -n "<ListDetail\b" app registry --glob '!registry/cobalt/ui/*'`): the part is new. The Screener and Filing alerts scenes navigate away from their list instead (`docs/research/2026-10-17-missing-parts.md`, F9); the part takes the detail beside the list and the arrow keys from TSA's event panel (`~/tsaglobal-superapp-live/apps/web/app/components/events/event-sheet.tsx`) and the one-view-on-a-phone rule from SettingsLayout.

### Example files
| File | Covers | Caption |
|---|---|---|
| `docs/system/examples/list-detail/default.tsx` | default | Filings to review, the chosen one beside the list, the keys moving through them, and one view at a time below 640px |
| `docs/system/examples/list-detail/default.tsx` | state:chosen | The chosen filing with its soft fill and its detail |
| `docs/system/examples/list-detail/default.tsx` | state:narrow | Below 640px the chosen filing replaces the list, with Back to filings above its title |
| Not applicable: the examples open on a chosen row; the stress page's empty state shows it | state:none | A wide layout with nothing chosen shows the placeholder |
| `docs/system/examples/list-detail/in-shell.tsx` | composition:AppShell | The filings page of an app, the main area given whole to the list and the detail |

Example: Filings to review, the chosen one beside the list, the keys moving through them, and one view at a time below 640px (`docs/system/examples/list-detail/default.tsx`)

```tsx
import { useState } from "react";

import { DataList, DataListItem, DataListLabel, DataListValue } from "@/components/cobalt/ui/data-list";
import { ItemContent, ItemDescription, ItemTitle } from "@/components/cobalt/ui/item";
import {
  ListDetail,
  ListDetailItem,
  ListDetailList,
  ListDetailPanel,
} from "@/components/cobalt/ui/list-detail";
import { RelativeTime } from "@/components/cobalt/ui/relative-time";
import { compactMoney, date } from "@/lib/cobalt/format";

// A fixed moment, so the times read the same on every visit.
const now = Date.UTC(2026, 9, 16, 15, 0);
const hour = 3_600_000;

const filings = [
  {
    id: "f-1",
    fund: "Calder Global Equity",
    form: "13F",
    at: now - 2 * hour,
    assets: 4_812_640_000,
    adviser: "Calder Partners",
    period: "2026-09-30",
  },
  {
    id: "f-2",
    fund: "Northgate Short Duration",
    form: "Form ADV",
    at: now - 7 * hour,
    assets: 1_204_000_000,
    adviser: "Northgate Advisors",
    period: "2026-06-30",
  },
  {
    id: "f-3",
    fund: "Harbour Street Master Fund",
    form: "Form PF",
    at: now - 27 * hour,
    assets: 48_200_000_000,
    adviser: "Harbour Street Partners",
    period: "2026-06-30",
  },
  {
    id: "f-4",
    fund: "Oakline Energy Transition",
    form: "13F",
    at: now - 50 * hour,
    assets: 902_300_000,
    adviser: "Oakline Capital",
    period: "2026-09-30",
  },
  {
    id: "f-5",
    fund: "Meridian Credit Opportunities",
    form: "Form D",
    at: now - 4 * 24 * hour,
    assets: 310_500_000,
    adviser: "Meridian Capital",
    period: "2026-08-31",
  },
];

export default function Example() {
  // Keep the choice in the address in your app, so Back and a shared link open the same filing.
  const [selected, setSelected] = useState<string | null>("f-1");
  const filing = filings.find((f) => f.id === selected);
  return (
    <div className="h-96 w-full">
      <ListDetail
        label="Filings"
        selected={selected}
        onSelectedChange={setSelected}
        labels={{ previous: "Previous filing", next: "Next filing" }}
      >
        <ListDetailList>
          {filings.map((f) => (
            <ListDetailItem key={f.id} value={f.id}>
              {/* The time shares the second line with the form, so the fund's name has the whole first line. */}
              <ItemContent>
                <ItemTitle>{f.fund}</ItemTitle>
                <ItemDescription>
                  {f.form}, <RelativeTime value={f.at} now={now} />
                </ItemDescription>
              </ItemContent>
            </ListDetailItem>
          ))}
        </ListDetailList>
        <ListDetailPanel title={filing ? `${filing.fund}, ${filing.form}` : undefined}>
          {filing && (
            <DataList>
              <DataListItem>
                <DataListLabel>Adviser</DataListLabel>
                <DataListValue>{filing.adviser}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Gross assets</DataListLabel>
                <DataListValue>{compactMoney(filing.assets)}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Period</DataListLabel>
                <DataListValue>{date(filing.period)}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Filed</DataListLabel>
                <DataListValue>
                  <RelativeTime value={filing.at} now={now} />
                </DataListValue>
              </DataListItem>
            </DataList>
          )}
        </ListDetailPanel>
      </ListDetail>
    </div>
  );
}
```

Example: The filings page of an app, the main area given whole to the list and the detail (`docs/system/examples/list-detail/in-shell.tsx`)

```tsx
import { useState } from "react";

import { FileTextIcon, HomeIcon, LayoutGridIcon } from "@/components/cobalt/icon";
import { DataList, DataListItem, DataListLabel, DataListValue } from "@/components/cobalt/ui/data-list";
import { ItemContent, ItemDescription, ItemTitle } from "@/components/cobalt/ui/item";
import {
  ListDetail,
  ListDetailItem,
  ListDetailList,
  ListDetailPanel,
} from "@/components/cobalt/ui/list-detail";
import { PageHeader } from "@/components/cobalt/ui/page-header";
import { RelativeTime } from "@/components/cobalt/ui/relative-time";
import {
  AppShell,
  AppShellHeader,
  AppShellMain,
  Sidebar,
  SidebarBody,
  SidebarGroup,
  SidebarItem,
  SidebarTrigger,
} from "@/components/cobalt/ui/sidebar";
import { compactMoney } from "@/lib/cobalt/format";

// A fixed moment, so the times read the same on every visit.
const now = Date.UTC(2026, 9, 16, 15, 0);
const hour = 3_600_000;

const filings = Array.from({ length: 14 }, (_, i) => ({
  id: `filing-${i + 1}`,
  fund: [
    "Calder Global Equity",
    "Northgate Short Duration",
    "Harbour Street Master Fund",
    "Oakline Energy Transition",
    "Meridian Credit Opportunities",
    "Solberg Nordic Value",
    "Brandt European Growth",
  ][i % 7]!,
  form: ["13F", "Form ADV", "Form PF", "Form D"][i % 4]!,
  at: now - (i * 7 + 2) * hour,
  assets: 300_000_000 + ((i * 7919) % 41) * 1_000_000_000,
}));

export default function Example() {
  // Nothing open at first, so a narrow frame shows the list, and a wide one the list beside the
  // panel's prompt to choose a filing.
  const [selected, setSelected] = useState<string | null>(null);
  const filing = filings.find((f) => f.id === selected);
  return (
    <div className="h-128 w-full overflow-hidden rounded-2xl ring-1 ring-border">
      <AppShell
        className="h-full"
        defaultFolded
        sidebar={
          <Sidebar label="Main">
            <SidebarBody>
              <SidebarGroup>
                <SidebarItem href="#home" label="Home" icon={<HomeIcon />} />
                <SidebarItem href="#funds" label="Funds" icon={<LayoutGridIcon />} />
                <SidebarItem href="#filings" label="Filings" icon={<FileTextIcon />} current />
              </SidebarGroup>
            </SidebarBody>
          </Sidebar>
        }
      >
        <AppShellHeader>
          <SidebarTrigger />
        </AppShellHeader>
        <AppShellMain layout="fill" className="gap-4">
          <PageHeader title="Filings" description="New filings from the funds you follow" />
          <ListDetail
            label="Filings"
            selected={selected}
            onSelectedChange={setSelected}
            labels={{ previous: "Previous filing", next: "Next filing" }}
            className="min-h-0 flex-1"
          >
            <ListDetailList>
              {filings.map((f) => (
                <ListDetailItem key={f.id} value={f.id}>
                  {/* The time shares the second line with the form, so the fund's name has the whole first line. */}
                  <ItemContent>
                    <ItemTitle>{f.fund}</ItemTitle>
                    <ItemDescription>
                      {f.form}, <RelativeTime value={f.at} now={now} />
                    </ItemDescription>
                  </ItemContent>
                </ListDetailItem>
              ))}
            </ListDetailList>
            <ListDetailPanel title={filing ? `${filing.fund}, ${filing.form}` : undefined}>
              {filing && (
                <DataList>
                  <DataListItem>
                    <DataListLabel>Form</DataListLabel>
                    <DataListValue>{filing.form}</DataListValue>
                  </DataListItem>
                  <DataListItem>
                    <DataListLabel>Gross assets</DataListLabel>
                    <DataListValue>{compactMoney(filing.assets)}</DataListValue>
                  </DataListItem>
                </DataList>
              )}
            </ListDetailPanel>
          </ListDetail>
        </AppShellMain>
      </AppShell>
    </div>
  );
}
```

## Variants
Not applicable: one layout whose shape follows its width.

## States
| State | Trigger | What the user can do | Shown by, besides color | Checked by |
|---|---|---|---|---|
| none | `selected` is null | choose a row | wide: the list beside the placeholder; narrow: the list alone | test |
| chosen | `selected` names a row | read it, step with Previous, Next or the keys, choose another | the row's `aria-current` and soft fill; the detail with its title | test |
| narrow | the frame under 640px wide | the same, one view at a time | the list, or the detail with the back control above its title | screenshot |
| first, last | the chosen row is the first or the last | step the other way | Previous or Next disabled, kept focusable | by hand |
| hover | pointer over a row, under `(hover: hover)` | choose it | the grey fill | by hand |
| focus-visible | Tab onto a row | choose it with Enter | the outline on its 12px corner | by hand |

Example: The chosen filing with its soft fill and its detail (`docs/system/examples/list-detail/default.tsx`)

```tsx
import { useState } from "react";

import { DataList, DataListItem, DataListLabel, DataListValue } from "@/components/cobalt/ui/data-list";
import { ItemContent, ItemDescription, ItemTitle } from "@/components/cobalt/ui/item";
import {
  ListDetail,
  ListDetailItem,
  ListDetailList,
  ListDetailPanel,
} from "@/components/cobalt/ui/list-detail";
import { RelativeTime } from "@/components/cobalt/ui/relative-time";
import { compactMoney, date } from "@/lib/cobalt/format";

// A fixed moment, so the times read the same on every visit.
const now = Date.UTC(2026, 9, 16, 15, 0);
const hour = 3_600_000;

const filings = [
  {
    id: "f-1",
    fund: "Calder Global Equity",
    form: "13F",
    at: now - 2 * hour,
    assets: 4_812_640_000,
    adviser: "Calder Partners",
    period: "2026-09-30",
  },
  {
    id: "f-2",
    fund: "Northgate Short Duration",
    form: "Form ADV",
    at: now - 7 * hour,
    assets: 1_204_000_000,
    adviser: "Northgate Advisors",
    period: "2026-06-30",
  },
  {
    id: "f-3",
    fund: "Harbour Street Master Fund",
    form: "Form PF",
    at: now - 27 * hour,
    assets: 48_200_000_000,
    adviser: "Harbour Street Partners",
    period: "2026-06-30",
  },
  {
    id: "f-4",
    fund: "Oakline Energy Transition",
    form: "13F",
    at: now - 50 * hour,
    assets: 902_300_000,
    adviser: "Oakline Capital",
    period: "2026-09-30",
  },
  {
    id: "f-5",
    fund: "Meridian Credit Opportunities",
    form: "Form D",
    at: now - 4 * 24 * hour,
    assets: 310_500_000,
    adviser: "Meridian Capital",
    period: "2026-08-31",
  },
];

export default function Example() {
  // Keep the choice in the address in your app, so Back and a shared link open the same filing.
  const [selected, setSelected] = useState<string | null>("f-1");
  const filing = filings.find((f) => f.id === selected);
  return (
    <div className="h-96 w-full">
      <ListDetail
        label="Filings"
        selected={selected}
        onSelectedChange={setSelected}
        labels={{ previous: "Previous filing", next: "Next filing" }}
      >
        <ListDetailList>
          {filings.map((f) => (
            <ListDetailItem key={f.id} value={f.id}>
              {/* The time shares the second line with the form, so the fund's name has the whole first line. */}
              <ItemContent>
                <ItemTitle>{f.fund}</ItemTitle>
                <ItemDescription>
                  {f.form}, <RelativeTime value={f.at} now={now} />
                </ItemDescription>
              </ItemContent>
            </ListDetailItem>
          ))}
        </ListDetailList>
        <ListDetailPanel title={filing ? `${filing.fund}, ${filing.form}` : undefined}>
          {filing && (
            <DataList>
              <DataListItem>
                <DataListLabel>Adviser</DataListLabel>
                <DataListValue>{filing.adviser}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Gross assets</DataListLabel>
                <DataListValue>{compactMoney(filing.assets)}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Period</DataListLabel>
                <DataListValue>{date(filing.period)}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Filed</DataListLabel>
                <DataListValue>
                  <RelativeTime value={filing.at} now={now} />
                </DataListValue>
              </DataListItem>
            </DataList>
          )}
        </ListDetailPanel>
      </ListDetail>
    </div>
  );
}
```

Example: Below 640px the chosen filing replaces the list, with Back to filings above its title (`docs/system/examples/list-detail/default.tsx`)

```tsx
import { useState } from "react";

import { DataList, DataListItem, DataListLabel, DataListValue } from "@/components/cobalt/ui/data-list";
import { ItemContent, ItemDescription, ItemTitle } from "@/components/cobalt/ui/item";
import {
  ListDetail,
  ListDetailItem,
  ListDetailList,
  ListDetailPanel,
} from "@/components/cobalt/ui/list-detail";
import { RelativeTime } from "@/components/cobalt/ui/relative-time";
import { compactMoney, date } from "@/lib/cobalt/format";

// A fixed moment, so the times read the same on every visit.
const now = Date.UTC(2026, 9, 16, 15, 0);
const hour = 3_600_000;

const filings = [
  {
    id: "f-1",
    fund: "Calder Global Equity",
    form: "13F",
    at: now - 2 * hour,
    assets: 4_812_640_000,
    adviser: "Calder Partners",
    period: "2026-09-30",
  },
  {
    id: "f-2",
    fund: "Northgate Short Duration",
    form: "Form ADV",
    at: now - 7 * hour,
    assets: 1_204_000_000,
    adviser: "Northgate Advisors",
    period: "2026-06-30",
  },
  {
    id: "f-3",
    fund: "Harbour Street Master Fund",
    form: "Form PF",
    at: now - 27 * hour,
    assets: 48_200_000_000,
    adviser: "Harbour Street Partners",
    period: "2026-06-30",
  },
  {
    id: "f-4",
    fund: "Oakline Energy Transition",
    form: "13F",
    at: now - 50 * hour,
    assets: 902_300_000,
    adviser: "Oakline Capital",
    period: "2026-09-30",
  },
  {
    id: "f-5",
    fund: "Meridian Credit Opportunities",
    form: "Form D",
    at: now - 4 * 24 * hour,
    assets: 310_500_000,
    adviser: "Meridian Capital",
    period: "2026-08-31",
  },
];

export default function Example() {
  // Keep the choice in the address in your app, so Back and a shared link open the same filing.
  const [selected, setSelected] = useState<string | null>("f-1");
  const filing = filings.find((f) => f.id === selected);
  return (
    <div className="h-96 w-full">
      <ListDetail
        label="Filings"
        selected={selected}
        onSelectedChange={setSelected}
        labels={{ previous: "Previous filing", next: "Next filing" }}
      >
        <ListDetailList>
          {filings.map((f) => (
            <ListDetailItem key={f.id} value={f.id}>
              {/* The time shares the second line with the form, so the fund's name has the whole first line. */}
              <ItemContent>
                <ItemTitle>{f.fund}</ItemTitle>
                <ItemDescription>
                  {f.form}, <RelativeTime value={f.at} now={now} />
                </ItemDescription>
              </ItemContent>
            </ListDetailItem>
          ))}
        </ListDetailList>
        <ListDetailPanel title={filing ? `${filing.fund}, ${filing.form}` : undefined}>
          {filing && (
            <DataList>
              <DataListItem>
                <DataListLabel>Adviser</DataListLabel>
                <DataListValue>{filing.adviser}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Gross assets</DataListLabel>
                <DataListValue>{compactMoney(filing.assets)}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Period</DataListLabel>
                <DataListValue>{date(filing.period)}</DataListValue>
              </DataListItem>
              <DataListItem>
                <DataListLabel>Filed</DataListLabel>
                <DataListValue>
                  <RelativeTime value={filing.at} now={now} />
                </DataListValue>
              </DataListItem>
            </DataList>
          )}
        </ListDetailPanel>
      </ListDetail>
    </div>
  );
}
```

### State precedence
- None and chosen: Not applicable: `selected` is one value.
- Chosen and narrow: both show. The detail replaces the list and carries the way back.
- Chosen and hover: chosen wins. The soft fill stays under the pointer.
- First and last: both show when the list has one row, and both buttons are disabled.
- Focus-visible and chosen: both show. The outline is drawn outside the fill.

### Motion
| Trigger | Kind | Preset | Properties | Reduced motion |
|---|---|---|---|---|
| the choice moves | announce | `--t-crossfade` on `--curve-sheet` (Crossfade) | the detail's content fades in; the header and the list stay | the content shows at once |
| the choice moves, in the list | announce | `duration-settle ease-settle` (`--t-settle`, 300ms): the list is an `ItemGroup`, whose soft fill slides from the last row chosen to the new one; measured at 1440, the first filing to the third, the fill's top goes 0, 12, 55, 87, 105, 113, 117, 119, 120px at 33ms steps (`.design-system/evidence/item/current-mark.json`) | transform (translateY) and height of the fill | the fill jumps |
| pointer over and out, and press, on a row | input | `pressable`, `--t-press` on `--curve` | background-color, color, box-shadow | the same colour change; nothing moves |

Measured at 1440 in an 840px and a 624px frame (`.design-system/evidence/list-detail/step-1440.json`): stepping with j and the down arrow moves the choice from the first filing to the third while every row and the detail's title stay where they were.

## Props

<!-- Props generated from registry/cobalt/ui/list-detail.tsx with TypeScript by scripts/props-table.mjs -->
### ListDetail

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `children` | `ReactNode` |  |  |
| `label` | `string` |  | The list's accessible name, such as "Filings". |
| `onSelectedChange` | `(value: string) => void` |  |  |
| `selected` | `string` |  |  |
| `className?` | `string` |  |  |
| `labels?` | `Partial<Labels>` | `{}` |  |
| `renderLink?` | `RenderLink` | `defaultLink` | Swaps the rows' and the back link's anchors for a router's links. |

### ListDetailList

No props of its own.

Also accepts every native `<ul>` attribute.

### ListDetailItem

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `children` | `ReactNode` |  |  |
| `value` | `string` |  |  |
| `className?` | `string` |  |  |
| `href?` | `string` |  |  |

### ListDetailPanel

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `actions?` | `ReactNode` |  | One or two controls after the title, such as Save. |
| `children?` | `ReactNode` |  | The chosen row's content. |
| `className?` | `string` |  |  |
| `placeholder?` | `ReactNode` |  | What a wide layout shows with nothing chosen. |
| `title?` | `ReactNode` |  | The chosen row's name, the panel's heading. |

`ListDetail` takes `label`, the list's name and the back control's words ("Back to filings"); `selected` and `onSelectedChange`; `labels` (`back`, `previous`, `next`, `placeholderTitle`, `placeholderDescription`); and `renderLink`. `ListDetailItem` takes `value`, `href` and the row's content as children. `ListDetailPanel` takes `title`, `actions`, `placeholder` and the content as children. `ListDetailList` passes a `ul`'s attributes through.

## Usage

### When to use
- Triage and review: filings, alerts, tickets, applications, a moderation queue, where a person reads one, then the next.
- A list whose rows are worth reading in full but not worth a page change each.

### When not to use
- Rows a person compares across columns. Use DataTable instead.
- Sections of settings. Use SettingsLayout instead.
- A record a person opens once and stays on. Use Card instead, on the record's own page.

### Rules
- `rule/list-detail-selection-in-address`: When keeping `selected`, write it to the address, such as `?filing=f-12`, and read it back, instead of component state alone, because Back then returns to the list on a phone and a link sent to a colleague opens the same row. Evidence: principle platform: the address is the state a person can share and go back to; person D5. Check: review.
  - Don't: `const [selected, setSelected] = useState(null)` in a routed page
  - Do: `const selected = params.get("filing"); onSelectedChange={(v) => setParams(v ? { filing: v } : {})}`
- `rule/list-detail-rows-with-href`: When each row has a page of its own, pass `href` to `ListDetailItem`, instead of a button, because a link opens in a new tab with a modifier and the part chooses nothing then. Evidence: principle platform: a link opens in a new tab; single use registry/cobalt/ui/list-detail.tsx:275-276. Check: test `list-detail.test.tsx` finds the chosen row an `a` with `aria-current="page"`.
  - Don't: `<ListDetailItem value={f.id}>` for a filing that has a page
  - Do: `<ListDetailItem value={f.id} href={`/filings/${f.id}`}>`
- `rule/list-detail-title-names-row`: When passing `title` to `ListDetailPanel`, give the chosen row's own name, such as "Calder Global Equity, 13F", instead of the list's name, because the title is the detail's heading and where focus lands when it replaces the list on a phone. Evidence: principle wcag: 2.4.6 headings and labels; single use docs/system/examples/list-detail/default.tsx:93. Check: test `list-detail.test.tsx` reads the h2.
  - Don't: `<ListDetailPanel title="Filings">`
  - Do: `<ListDetailPanel title={`${filing.fund}, ${filing.form}`}>`

### Content
- `rule/list-detail-back-names-list`: When the list's `label` is not the plural noun the back control should say, pass `labels.back` as "Back to {list}", such as "Back to filings", instead of "Back", because on a phone the control is the only sign of where the list went. Evidence: principle heuristic: recognition rather than recall; single use registry/cobalt/ui/list-detail.tsx:120. Check: review.
  - Don't: `labels={{ back: "Back" }}`
  - Do: `labels={{ back: "Back to filings" }}`

### Anti-slop
- `rule/list-detail-no-empty-pane`: When the layout is wide and the person has opened nothing, choose the first row, or pass a `placeholder` that says what will show, instead of an empty white card, because a blank pane beside a list reads as a failed load. Evidence: principle heuristic: visibility of system status; person D39. Check: review.
  - Don't: `<ListDetailPanel placeholder={null} />`
  - Do: `const [selected, setSelected] = useState(filings[0].id)`

### Limits
- `rule/list-detail-title-room`: When a row's title runs past 20 characters, put the rest in `ItemDescription`, instead of a longer title, because the 256px list leaves a title 151px beside its time, 183px in the 288px list from 768px, and the rest is cut. Evidence: measured 151px and 183px for a title beside "2 hours ago" in 256px and 288px lists, at 7.39px a character, `.design-system/evidence/list-detail/step-1440.json`. Check: probe docs/system/stress/list-detail.tsx with the worst case at 1440.
  - Don't: `<ItemTitle>Northwind Industries Holdings Global Infrastructure Master Fund</ItemTitle>`
  - Do: `<ItemTitle>Northwind Global Infrastructure</ItemTitle><ItemDescription>Master Fund LP, Form ADV</ItemDescription>`

## Accessibility
Rests on a `ul` of links or buttons named by `label`, a `section` named by the detail's `h2`, and `useRowKeys`.

### Keyboard
| Key | Where focus is | Effect | Focus after | Checked by |
|---|---|---|---|---|
| Down arrow, j | anywhere outside a field, a menu or an open overlay, wide | chooses the next row | the new row when focus was on a row, else where it was | by hand |
| Up arrow, k | the same | chooses the row before | the same | by hand |
| Down arrow, Up arrow, j, k | a row, narrow | moves focus to the next or the last row | that row | by hand |
| Enter, Space | a row | chooses it; narrow, the detail replaces the list | the row; narrow, the detail's title | by hand |
| Enter | the back control, narrow | clears the choice and shows the list | the row that was open | by hand |
| Enter | Previous or Next | chooses the row before or after | the button | by hand |

### ARIA
| Part | Role | Accessible name from | States and properties | Announced | Checked by |
|---|---|---|---|---|---|
| ListDetailList | list | `label` | none | "Filings, list, 5 items" | test |
| ListDetailItem with `href` | link | its content | `aria-current="page"` when chosen | "Calder Global Equity 13F, link, current page" | test |
| ListDetailItem without `href` | button | its content | `aria-current="true"` when chosen | "Calder Global Equity 13F, button, current" | test |
| ListDetailPanel | region | its `h2` through `aria-labelledby` | none | "Calder Global Equity, 13F, region" | test |
| title | heading, level 2 | `title` | `tabindex="-1"` to take focus on a phone | the heading when focus lands | test |
| Previous, Next | button | `labels.previous`, `labels.next` | `aria-disabled` at the ends | "Next filing, button" | test |

## Tokens
| Part | State | Token |
|---|---|---|
| list | all | `--r-xl`, `--control` (Item) |
| row | chosen | `--primary-soft` |
| row | hover, pressed | `--muted`, `--hover`, `--t-press`, `--curve` |
| detail | all | `--card`, `--r-2xl`, `--pad-card`, `--pad-card-sm` |
| detail content | changing | `--t-crossfade`, `--curve-sheet` |
| back control | all | `--secondary`, `--r-control` |

## Related
- DataTable: rows compared across columns, with its own row selection.
- Item: the row inside the list.
- Sidebar: the frame, whose `AppShellMain layout="fill"` gives the whole area to this layout.
- SettingsLayout: the same one-view-on-a-phone rule for settings.
