Agent handoff
A marker that work passed from one agent (or person) to another. No script: the server renders who, why, when and the status.
Anatomy
div[data-ds-agent-handoff=row]
├── span[aria-hidden] avatar(from) → arrow → avatar(to) agent square, human round
└── div
├── p sentence · mark + status word · time
├── p reason
├── details[x-ds-keep-toggle] > summary "What was handed over" + body (summary)
└── div actions slot
div[data-ds-agent-handoff=divider]
├── div line · p(icon, sentence, sr-only status, time, mark) · line
├── p reason
└── div actions slot
Variants
| Variant | Shape |
|---|---|
row (default) | avatars and arrow, the sentence, reason, summary, actions |
divider | a centred rule with the sentence, like a date divider; reason and actions under it; no summary |
Status
The shared set (Support\AgentState, partials/agent-mark), shown only when
given: waiting reads "Waiting for you" (for a person to take over),
statusText replaces words. In the row the word is visible beside the mark;
in the divider it is visually hidden and the mark follows the time.
Time
Support\Moment, ds::timeline-item's rules: a date or ISO 8601 string is
formatted (timeFormat relative or a PHP format), anything else is shown as
written, a time element when there is a machine-readable moment.
Accessibility
| Role | none: a sentence, and a native disclosure |
| Name | the sentence ":from handed off to :to" carries it; the avatars are hidden |
| Keyboard | Tab to the summary (Enter or Space toggles) and the actions |
| Focus | the summary draws the system ring |
Do not
- Do not give the divider
role="separator". A separator's content is not read; this is text. - Do not hide the reason in the summary. Why it moved belongs in view.
From the package repo: edit this page on GitHub.