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

## Description
What a list shows when it has nothing in it.

`import { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyAction } from "@/components/cobalt/ui/empty"`, source `registry/cobalt/ui/empty.tsx`, status `ready`.
Foundation: `shadcn empty (base-luma, base)`. Traps checked: `trap/toast-errors`, `trap/illustration-announced`, `trap/live-region-double`, `trap/color-only-status`, `trap/loading-layout-shift` (n/a: the state replaces the rows once they are known to be none, so it does not sit beside a loader), `trap/demo-on-timers` (n/a: every example holds still), `trap/reduced-motion-ignored` (n/a: no motion).

### Foundation
| Given by the foundation | Added by the team |
|---|---|
| The parts `Empty`, `EmptyHeader`, `EmptyTitle`, `EmptyDescription` and `EmptyContent` as plain `div`s with `data-slot` names; a centred column with the title over the sentence over the actions | The stock frame (a dashed rounded border with its own padding) is dropped: no surface of its own, because the card or table around it is the surface; `align="start"` for the same state inside a card; `reason="error"`, which sets `role="alert"` so a failed load is announced once; `reason="filtered"`, rows that exist but pass no filter, announced by nothing since the count beside the filters says 0; `notice`, a line under the content for a retry still out, such as `LongWaitNotice`, whose held room the centred state's bottom padding gives back (`pb-2` for the 32px line and its 16px gap), so the visible state sits 56px from the top and the bottom instead of 56 over 104 (measured at 1440; at 390, where the notice wraps to two lines, 56 over 80), with both of its lines centred when it wraps; the stock `EmptyMedia` icon circle dropped, since a grey disc adds a fill and says nothing the title does not; `EmptyAction`, a `secondary` Button at the button's own `rounded-lg`, with no `variant` or `size` to choose; the title at `font-semibold` (D21); the sentence capped at `max-w-xs` when centred; the title and sentence break a word with no spaces (`wrap-anywhere`), and `EmptyContent` is held to the state's width (`max-w-full`), so a long translated `EmptyAction` label wraps inside its Button instead of running out of the state |

## Examples
No results with a way out, a failed load with a retry, a list that fills itself, and a card with nothing in it yet. Each one's box keeps its height when its action succeeds and the rows take its place: the filtered list holds room for every fund, and the failed load and the card keep the state, hidden, in the cell the rows share, so nothing below moves (they jumped 146px and 117px before).

Real uses, 0 call sites (`rg -n "<Empty\b" app docs/system/examples --glob '!docs/system/examples/empty/*'`): the showcase chrome renders no Empty of its own yet, and the examples folder does not count.

Uses inside the registry, which other components build on (planned as product uses once the first screen lands on the system):
- The data table's slot at 0 rows, at the start, `reason="error"` on failure with one retry button, `registry/cobalt/ui/data-table.tsx:2340-2347`, `reason="filtered"` with Clear filters when filters left nothing, `registry/cobalt/ui/data-table.tsx:2349-2357`, and `reason="empty"` otherwise, `registry/cobalt/ui/data-table.tsx:2363`.

### Example files
| File | Covers | Caption |
|---|---|---|
| `docs/system/examples/empty/default.tsx` | default | Filters that match no fund leave the empty state where the rows would be, with one button that clears them; the box keeps its height either way |
| Not applicable: default.tsx is filtered, `reason="filtered"` | reason=filtered | Rows that pass no filter, with Clear filters |
| Not applicable: default.tsx is centred, the default | align=center | The title over the sentence and the button, centred in the space the rows left |
| Not applicable: in-card.tsx aligns to the card's start edge | align=start | Aligned to the start edge, inside a card or a section |
| Not applicable: in-card.tsx is the empty reason, the default | reason=empty | No role, nothing announced, the rows are known to be none |
| `docs/system/examples/empty/reason-error.tsx` | reason=error | A failed load, announced once, with one retry button; the events take its place at its height. A retry still out after 8 seconds says so under it, with a retry that starts it over |
| Not applicable: the empty state is default.tsx | state:empty | The title names what is missing |
| Not applicable: the error state is reason-error.tsx | state:error | The title names what failed |
| `docs/system/examples/empty/state-no-action.tsx` | state:no-action | A list that fills itself has only a title and sentence |
| `docs/system/examples/empty/in-card.tsx` | composition:Card | A dashboard card with nothing in it yet; the first event takes the empty state's place at its height |
| Not applicable: the examples show each align and reason | matrix:align,reason | Both alignments with both reasons |

Example: Filters that match no fund leave the empty state where the rows would be, with one button that clears them; the box keeps its height either way (`docs/system/examples/empty/default.tsx`)

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

import {
  Empty,
  EmptyAction,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyTitle,
} from "@/components/cobalt/ui/empty";
import { Item, ItemActions, ItemContent, ItemGroup, ItemTitle } from "@/components/cobalt/ui/item";
import { Pill } from "@/components/cobalt/ui/pill";

type Filter = "credit" | "luxembourg";

const funds = [
  { name: "Harbour Large Cap Core", strategy: "equity", domicile: "US", assets: "$4.8B" },
  { name: "Northgate Credit Opportunities", strategy: "credit", domicile: "US", assets: "$2.1B" },
  { name: "Calder Global Equity", strategy: "equity", domicile: "LU", assets: "$1.4B" },
  { name: "Alder Short Duration", strategy: "credit", domicile: "US", assets: "$0.9B" },
  { name: "Fjord Nordic Value", strategy: "equity", domicile: "LU", assets: "$0.6B" },
];

const filters: { value: Filter; label: string; keeps: (fund: (typeof funds)[number]) => boolean }[] = [
  { value: "credit", label: "Credit", keeps: (fund) => fund.strategy === "credit" },
  { value: "luxembourg", label: "Luxembourg", keeps: (fund) => fund.domicile === "LU" },
];

export default function Example() {
  // Every fund is already on the page, so a filter answers at once.
  const [on, setOn] = useState<Filter[]>(["credit", "luxembourg"]);
  const shown = funds.filter((fund) => filters.every((f) => !on.includes(f.value) || f.keeps(fund)));
  return (
    <div className="flex w-full max-w-md flex-col gap-3">
      <div role="group" aria-label="Filters" className="flex flex-wrap gap-2">
        {filters.map((f) => (
          <Pill
            key={f.value}
            pressed={on.includes(f.value)}
            onPressedChange={(pressed) =>
              setOn((was) => (pressed ? [...was, f.value] : was.filter((v) => v !== f.value)))
            }
          >
            {f.label}
          </Pill>
        ))}
      </div>
      {/* The rows and the empty state share one cell, and the empty state stays, hidden, while rows
          show, so the box is always as tall as the taller of the two and a filter moves nothing
          below. The 4px around the rows keeps their 12px corners concentric with the card's 16px. */}
      <div className="grid rounded-2xl bg-card p-1 *:col-start-1 *:row-start-1">
        {shown.length > 0 && (
          <ItemGroup render={<ul aria-label="Funds" />} className="self-start">
            {shown.map((fund) => (
              <Item key={fund.name} render={<li />}>
                <ItemContent>
                  <ItemTitle>{fund.name}</ItemTitle>
                </ItemContent>
                <ItemActions>{fund.assets}</ItemActions>
              </Item>
            ))}
          </ItemGroup>
        )}
        <Empty reason="filtered" className={shown.length > 0 ? "invisible" : ""}>
          <EmptyHeader>
            <EmptyTitle>No funds match</EmptyTitle>
            <EmptyDescription>No credit fund is domiciled in Luxembourg. Try fewer filters.</EmptyDescription>
          </EmptyHeader>
          <EmptyContent>
            <EmptyAction onClick={() => setOn([])}>Clear filters</EmptyAction>
          </EmptyContent>
        </Empty>
      </div>
    </div>
  );
}
```

Example: A dashboard card with nothing in it yet; the first event takes the empty state's place at its height (`docs/system/examples/empty/in-card.tsx`)

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

import { Card, CardContent, CardHeader, CardTitle } from "@/components/cobalt/ui/card";
import {
  Empty,
  EmptyAction,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyTitle,
} from "@/components/cobalt/ui/empty";
import { Item, ItemContent, ItemGroup, ItemTitle } from "@/components/cobalt/ui/item";
import { ListBody } from "@/components/cobalt/ui/list-body";
import { useAction } from "@/lib/cobalt/use-action";
import { useSlowWait } from "@/lib/cobalt/use-slow-wait";

// Stands in for your API call. It answers with a new draft after 900ms, and fails while the browser is
// offline or the address has ?network=offline.
const request = () =>
  new Promise<string>((resolve, reject) =>
    setTimeout(() => {
      const offline = !navigator.onLine || new URLSearchParams(location.search).get("network") === "offline";
      if (offline) reject(new Error("offline"));
      else resolve("Untitled event, draft");
    }, 900),
  );

export default function Example() {
  const [events, setEvents] = useState<string[]>([]);
  const create = useAction(async () => {
    const event = await request();
    setEvents((was) => [...was, event]);
  });
  const dimmed = useSlowWait(create.status === "pending");
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Upcoming events</CardTitle>
      </CardHeader>
      {/* The empty state and the list share one cell, and the empty state stays, hidden, once an
          event is in, so the card keeps its height and nothing below moves. */}
      <CardContent className="grid *:col-start-1 *:row-start-1">
        {events.length > 0 && (
          // Each row's text lines up with the card's title, its 10px inset taken back.
          <ItemGroup render={<ul aria-label="Upcoming events" />} className="-mx-2.5 self-start">
            {events.map((event, index) => (
              <Item key={index} render={<li />}>
                <ItemContent>
                  <ItemTitle>{event}</ItemTitle>
                </ItemContent>
              </Item>
            ))}
          </ItemGroup>
        )}
        <ListBody busy={dimmed} className={events.length > 0 ? "invisible" : ""}>
            <Empty align="start">
              <EmptyHeader>
                <EmptyTitle>No events yet</EmptyTitle>
                <EmptyDescription>
                  {create.error !== null
                    ? "The event was not created. Try again."
                    : "Events you create or join show up here."}
                </EmptyDescription>
              </EmptyHeader>
              <EmptyContent>
                <EmptyAction onClick={() => void create.run()}>Create event</EmptyAction>
              </EmptyContent>
            </Empty>
        </ListBody>
      </CardContent>
    </Card>
  );
}
```

## Variants

### align
- `center`: the whole list or result set is empty, and the state takes the space the rows left. Used at 0 call sites in the registry; the default example uses it.
- `start`: the same state inside a card, a section or a table, where the parent's own padding sets the edge. Used at 1 call site, the data table's slot, and the card example.

### reason
- `empty`: the rows are known to be none; nothing is announced. Used at 1 call site, the data table at 0 rows after a successful answer.
- `error`: the load failed; the root is `role="alert"` and is read once when it appears. Used at 1 call site, the data table on failure.
- `filtered`: the list has rows, and the filters leave none; the next step clears them, and nothing is announced, since the count beside the filters (ResultCount) already says 0. Used at 1 call site, the data table when a column or the table is `filtered`.

Example: A failed load, announced once, with one retry button; the events take its place at its height. A retry still out after 8 seconds says so under it, with a retry that starts it over (`docs/system/examples/empty/reason-error.tsx`)

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

import {
  Empty,
  EmptyAction,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyTitle,
} from "@/components/cobalt/ui/empty";
import { Item, ItemContent, ItemGroup, ItemTitle } from "@/components/cobalt/ui/item";
import { ListBody } from "@/components/cobalt/ui/list-body";
import { LongWaitNotice } from "@/components/cobalt/ui/long-wait-notice";
import { useAction } from "@/lib/cobalt/use-action";
import { useSlowWait } from "@/lib/cobalt/use-slow-wait";

const events = ["Autumn reading night, Oct 23", "Motion study group, Oct 29", "Tokens workshop, Nov 4"];

// Stands in for your API call. The first load failed before you arrived, as if the connection had
// dropped. Try again answers after 900ms, hangs for 20 seconds while the address has ?network=slow,
// and fails while the browser is offline or the address has ?network=offline.
const request = () =>
  new Promise<string[]>((resolve, reject) => {
    const network = new URLSearchParams(location.search).get("network");
    setTimeout(
      () => {
        if (!navigator.onLine || network === "offline") reject(new Error("offline"));
        else resolve(events);
      },
      network === "slow" ? 20_000 : 900,
    );
  });

export default function Example() {
  const [attempts, setAttempts] = useState(0);
  const [loaded, setLoaded] = useState<string[]>([]);
  const retry = useAction(async () => {
    try {
      setLoaded(await request());
    } finally {
      setAttempts((n) => n + 1);
    }
  });
  // The state dims while the retry runs; a new failure mounts it again, so it is announced again.
  const dimmed = useSlowWait(retry.status === "pending");
  const done = loaded.length > 0;
  // The events and the failure share one cell, so the box keeps the failure's height when the
  // events arrive and nothing below moves.
  return (
    <div className="grid w-full max-w-md *:col-start-1 *:row-start-1">
      {/* Hidden, not removed, once the events are in, so it still holds the height. */}
      <Empty
        key={attempts}
        reason="error"
        className={done ? "invisible" : ""}
        // Under the state and out of the dimmed part, so its retry can be pressed while the first waits.
        notice={
          <LongWaitNotice
            waiting={retry.status === "pending"}
            attempt={retry.attempt}
            onRetry={() => {
              retry.cancel();
              void retry.run();
            }}
          />
        }
      >
        <ListBody busy={dimmed} className="flex flex-col items-center gap-4">
          <EmptyHeader>
            <EmptyTitle>Could not load your events</EmptyTitle>
            <EmptyDescription>Check the connection and try again.</EmptyDescription>
          </EmptyHeader>
          <EmptyContent>
            <EmptyAction onClick={() => void retry.run()}>Try again</EmptyAction>
          </EmptyContent>
        </ListBody>
      </Empty>
      {done && (
        <ItemGroup variant="card" render={<ul aria-label="Your events" />} className="self-start">
          {loaded.map((event) => (
            <Item key={event} render={<li />}>
              <ItemContent>
                <ItemTitle>{event}</ItemTitle>
              </ItemContent>
            </Item>
          ))}
        </ItemGroup>
      )}
    </div>
  );
}
```

## States
| State | Trigger | What the user can do | Shown by, besides color | Checked by |
|---|---|---|---|---|
| empty | the list, table or search has 0 rows and `reason="empty"` | press the button, read why | the title naming the object, the sentence | screenshot |
| error | the load failed and `reason="error"` | press the retry button | the title naming what failed, `role="alert"` read once | test |
| no-action | no `EmptyAction` child, the list fills itself | read | the title and the sentence only | screenshot |
| filtered | `reason="filtered"` | clear the filters | the title saying nothing matches, the Clear filters button; no role | test |
| retry-slow | `notice` holds a `LongWaitNotice` and the retry runs past 8 seconds | retry again, which cancels the first | "This is taking longer than usual." and Retry under the content, in a line held from the first frame, so the words arriving move nothing (measured 0px of shift over the 8.6 seconds of a slow retry at 1440 and 390) | screenshot |

Example: A list that fills itself has only a title and sentence (`docs/system/examples/empty/state-no-action.tsx`)

```tsx
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "@/components/cobalt/ui/empty";

export default function Example() {
  return (
    <Empty>
      <EmptyHeader>
        <EmptyTitle>No notifications yet</EmptyTitle>
        <EmptyDescription>A reply or an invitation shows up here.</EmptyDescription>
      </EmptyHeader>
    </Empty>
  );
}
```

### State precedence
- Empty and error: Not applicable: `reason` is one or the other, and so is filtered.
- Error and retry-slow: both show. The alert stays, dimmed with its button while the retry runs, and the notice under it is live and pressable.
- Error and no-action: both show. The alert names what failed and the host passes no retry, as the data table does without `onRetry`.
- Centred and start-aligned: Not applicable: `align` is one or the other.

### Motion
Not applicable: no motion. The button carries Button's press, and nothing else moves.

## Props

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

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `align?` | `"center" \| "start"` | `"center"` | `center` the whole list or result set is empty; `start` the same state inside a card. |
| `notice?` | `ReactNode` |  | Under the content: a `LongWaitNotice` for a retry that is taking too long. |
| `reason?` | `"empty" \| "error" \| "filtered"` | `"empty"` | `empty` the rows are known to be none; `error` the load failed; `filtered` the list has rows. |

Also accepts every native `<div>` attribute.

### EmptyHeader

No props of its own.

Also accepts every native `<div>` attribute.

### EmptyTitle

No props of its own.

Also accepts every native `<div>` attribute.

### EmptyDescription

No props of its own.

Also accepts every native `<div>` attribute.

### EmptyContent

No props of its own.

Also accepts every native `<div>` attribute.

### EmptyAction

No props of its own.

Also accepts every native `<button>` attribute; from Base UI: `focusableWhenDisabled`, `nativeButton`, `render`.

`align` and `reason` (`empty`, `error` or `filtered`) are the two choices; `notice` goes under the content, last, for a `LongWaitNotice`; every other `div` attribute passes to the root, including `className` for placement. `EmptyAction` takes Button's props without `variant` and `size`, so the button is the same grey in every empty state, and `onClick` is the next step.

## Usage

### When to use
- A list, a table or a search has nothing to show, and you need to know what is missing and what makes it appear.
- A load failed and the place where the rows go must say so, with one way to try again.

### When not to use
- The rows are still on their way. Use Skeleton instead, until the answer is known.
- One value in a row is missing. Use DataTable's `none` label in the cell instead.
- An action finished or failed and the list is still there. Use Toaster instead, since the rows are the content and the result is a passing message.

### Rules
- `rule/empty-no-surface`: When an empty state sits inside a card, a section or a table, render `Empty` with no background, border or dashed frame of its own, and `align="start"` inside a card, because the parent is already the surface and a second one draws a box around nothing. Evidence: person D11; single use `registry/cobalt/ui/data-table.tsx:2341-2344`, the table's frame is the surface and the slot renders bare inside it, as every card and section would. Check: lint rule/component-override on Empty (scripts/check-system.mjs); review of every empty state in the showcase.
  - Don't: `<Empty className="rounded-2xl border border-dashed p-8">`
  - Do: `<Card><CardContent><Empty align="start">`
- `rule/empty-one-grey-pill`: When the empty state offers a next step, render exactly 1 `EmptyAction`, the grey button, instead of a primary `Button` or a link, because the accent is kept for the view's one primary action and an empty list is not it, and a second button leaves no one next step. Evidence: person D13; person D11; single use `registry/cobalt/ui/data-table.tsx:2347`, one retry button and nothing beside it, which is the whole set of next steps a table can offer; measured 2 actions fit in one row at 390, .design-system/evidence/empty/measure-390.json, so a second one competes on the same line. Check: lint `EmptyAction` omits `variant` and `size` from its props, so a variant fails `pnpm typecheck`; review counts `EmptyAction` children.
  - Don't: `<EmptyContent><Button>Create event</Button><Button variant="ghost">Learn more</Button></EmptyContent>`
  - Do: `<EmptyContent><EmptyAction>Create event</EmptyAction></EmptyContent>`
- `rule/empty-error-stays-in-place`: When a load fails with 0 rows to show, render `Empty` with `reason="error"`, a title that names what failed and one `EmptyAction` that retries, instead of a toast or a banner above a blank list, because the failure must stay where the rows were until the retry works, and a toast times out. Evidence: person D2; single use `registry/cobalt/ui/data-table.tsx:2340-2343`, the slot switches to `reason="error"` on failure, the same place the rows go; principle heuristic: help users recognize, diagnose and recover from errors, the way out sits with the problem. Check: test `empty.test.tsx` renders `reason="error"` and expects `role="alert"`.
  - Don't: `toast("Could not load your lists")` over an empty `<ul />`
  - Do: `<Empty reason="error"><EmptyHeader><EmptyTitle>Could not load your lists</EmptyTitle></EmptyHeader><EmptyContent><EmptyAction onClick={retry}>Try again</EmptyAction></EmptyContent></Empty>`
- `rule/empty-one-live-region`: When `reason="error"`, let the root be the one live region and wrap neither the title nor the retry in a second `role="status"` or `aria-live`, because two layers announce the same failure twice. Evidence: principle wcag: 4.1.3 Status messages, one announcement per change; single use `registry/cobalt/ui/data-table.tsx:2341-2347`, one alert and no second region, which holds for any host that renders the root once. Check: test `empty.test.tsx` counts one `role="alert"` and no `aria-live` in the error markup.
  - Don't: `<Empty reason="error"><div role="status"><EmptyTitle>Could not load your lists</EmptyTitle></div></Empty>`
  - Do: `<Empty reason="error"><EmptyHeader><EmptyTitle>Could not load your lists</EmptyTitle></EmptyHeader></Empty>`

### Content
- Follows `rule/writing-empty-title-object`.
- Follows `rule/writing-empty-body-why`.
- Follows `rule/writing-no-exclamation`.
- Follows `rule/button-label-is-the-outcome`.
- `rule/empty-no-invented-numbers`: When the sentence says why the list is empty, state what makes an item appear, such as "Events you create show up here.", instead of a count the product did not measure, because an invented statistic is a lie in the product's voice. Evidence: person D11. Check: lint copy/template on the empty-body slot (scripts/copy-check.mjs); review of every `EmptyDescription`.
  - Don't: `<EmptyDescription>Most teams add 12 events in their first week.</EmptyDescription>`
  - Do: `<EmptyDescription>Events you create show up here.</EmptyDescription>`

### Anti-slop
- `rule/empty-no-illustration`: When the state wants a picture, leave it out and let `EmptyTitle` name what is missing, instead of an icon in a grey circle, an illustration, an emoji or a gradient blob, because the picture repeats the title and adds a grey fill to a view that already has one in its button. Evidence: person D11; person D12; person D27; single use `registry/cobalt/ui/data-table.tsx:2361-2367`, no picture at all, the shape every host starts from. Check: lint rule/ban-emoji and rule/ban-gradient (scripts/check-system.mjs); review.
  - Don't: `<EmptyHeader><div className="size-11 rounded-full bg-muted"><InboxIcon /></div><EmptyTitle>No saved items</EmptyTitle></EmptyHeader>`
  - Do: `<EmptyHeader><EmptyTitle>No saved items</EmptyTitle></EmptyHeader>`

### Limits
- `rule/empty-sentence-length`: When the sentence would run past 82 characters, cut it to one clause instead of letting it wrap again, because at 83 characters it takes three lines at 390px, centred and inside a card alike, and stops reading as one calm sentence. Evidence: measured three lines at 83 characters and two at 43, .design-system/evidence/empty/measure-390.json. Check: probe .design-system/scripts/measure-feedback.mjs on the showcase at 390; lint copy/length on the empty-body slot holds 120 until the slot is remeasured (scripts/copy-check.mjs).
  - Don't: `<EmptyDescription>Nothing matches these filters yet, so try fewer of them or clear the search and start again.</EmptyDescription>`
  - Do: `<EmptyDescription>Nothing matches these filters. Try fewer of them.</EmptyDescription>`
- `rule/empty-title-length`: When a title would run past 36 characters, shorten it to the object and "yet", because at 37 characters it wraps to two lines at 390px. Evidence: measured two lines at 37 characters, .design-system/evidence/empty/measure-390.json; single use `registry/cobalt/ui/data-table.tsx:144`, a 15 character title, which fits any width the table renders at. Check: probe .design-system/scripts/measure-feedback.mjs on the showcase at 390; lint copy/length on the empty-title slot (scripts/copy-check.mjs).
  - Don't: `<EmptyTitle>Nothing saved in this workspace yet for anyone</EmptyTitle>`
  - Do: `<EmptyTitle>Nothing saved yet</EmptyTitle>`

## Accessibility
Rests on plain `div`s; the action rests on `<button>` from Button. Contrast, as drawn (.design-system/evidence/empty/measure-390.json): the title on the page and on a card 19.8:1 light and 17.18:1 dark; the sentence 6.01:1 light and 6.94:1 dark; the button's label on its fill 17.93:1 light and 17.18:1 dark; the grey button against the page 1.16:1 light and 1.18:1 dark, under the 3:1 of WCAG 1.4.11 Non-text contrast, so it reads by its words. NEEDS REVIEW.

### Keyboard
| Key | Where focus is | Effect | Focus after | Checked by |
|---|---|---|---|---|
| Tab | before the state | focuses the button, the only stop | the button | by hand |
| Enter or Space | the button | the next step, or the retry | the button, unless the step moves focus or the rows arrive and the state unmounts | by hand |

### ARIA
| Part | Role | Accessible name from | States and properties | Announced | Checked by |
|---|---|---|---|---|---|
| root, `reason="empty"` | none | nothing | `data-align`, `data-reason` | nothing on render; the title and sentence are read in order | test |
| root, `reason="error"` | alert | its text content | `data-reason="error"` | the title, the sentence and the button's label, once, when it appears | test |
| root, `reason="filtered"` | none | nothing | `data-reason="filtered"` | nothing on render; the count beside the filters announces 0 | test |
| notice | LongWaitNotice's own: a status line | its words | empty until the wait passes 8 seconds | "This is taking longer than usual." once | by hand |
| action | button | its label | none; `aria-busy` and `aria-disabled` only when the host wraps it in StateButton | the label and "button" on focus | a11y scan |

## Tokens
| Part | State | Token |
|---|---|---|
| root | all | none: no surface of its own |
| title | all | `--foreground` |
| description | all | `--muted-foreground` |
| action | rest | `--secondary`, `--secondary-foreground`, `--control`, `--r-lg` |
| action | hover | `--muted-hover` |

## Related
- Skeleton: the rows while they load, before the answer is known.
- DataTable: renders this at 0 rows, filtered when its filters left nothing, and takes `empty` for a host's own words.
- LongWaitNotice: the line `notice` holds while a retry runs long.
- Card: the surface a start-aligned empty state sits in.
- Toaster: the result of an action, which passes.
- Button: the action's base.
- Pagination: keeps the rows of a list, dimmed and out of reach, while the next page loads.
- PageColumns: the one page shape.
- RailCard: one block in a page's rail, the same on every page.
- Spinner: says that something is being read, in the slot where the answer will land.
- Alert: a message above content that exists, about something wrong or worth knowing.
- First use: what a new person sees before they have anything: a first step in place of an empty page.
- MissingValue: says why a value is missing: Unknown, Withheld, Not reported, Could not be read or Does not apply.
