Fault details is a native details disclosure holding a short description list of diagnostic values that the application has explicitly approved for the current audience, such as the public reference, application name, recovery state, a user-visible dependency name or an approved timestamp. It is deliberately conservative and is not an escape hatch for raw fault data. Redaction and authorization happen before the data reaches Forma: the application builds a separate safe view model and renders only that. Stack traces, exception details, secrets, raw context values, breadcrumbs, snapshot locations, tokens and internal paths never belong here.
Use when
Support or power users benefit from a few extra, approved facts about a fault without cluttering the primary message.
The application already has an audience-specific safe view model for the fault.
The details should be available on request rather than always visible.
Avoid when
The only extra information is the reference: show it with Fault reference in the fault body instead.
The values have not been sanitized and approved for this audience: do not render them at all.
You need a general optional-content disclosure unrelated to faults: use Disclosure.
You need a structured key/value display that is always visible: use Key-value list.
Behavior to know
Native details/summary: the browser owns open state, keyboard toggling and the expanded state exposed to assistive technology.
The summary row has a 44px minimum height so it is a comfortable touch target.
Terms and values sit in two columns on wide screens and stack below 36rem; values break anywhere.
An optional boundary note reminds readers that only approved values appear.
Basic example
The smallest correct markup: the canonical pattern from patterns/fault-details.html inside its public tag. Copy this first, then adapt labels, names and state.
Canonical
Minimal fault details
Rendered from the canonical pattern file.
Live demo. 1 native action works here and is verified by an outcome test.
Safe diagnostic details
Reference
AG-4F82C
Application
Chrona
Recovery state
Retry available
Only explicitly approved, already-sanitized diagnostic values belong in this surface.
Click or tap the code once to select all of it, then copy.
Examples
Scenario
Support view, open by default
A support agent's view where the application opens the disclosure initially with the open attribute. Every row comes from an approved safe view model; the dependency name is the user-visible service name, not an internal host.
Live demo. 1 native action works here and is verified by an outcome test.
Safe diagnostic details
Reference
AG-8LM3E
Application
Chrona
Affected service
Calendar sync
Recovery state
Waiting for sign-in
First seen
Only explicitly approved, already-sanitized diagnostic values are shown here.
Click or tap the code once to select all of it, then copy.
Scenario
Collapsed details under an inline fault
The disclosure composed inside the body of an inline fault, after the reference. The fault's message and recovery action remain visible whether or not the details are expanded.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
!
Error
Report export failed.
Your report settings are saved. Try the export again.
Click or tap the code once to select all of it, then copy.
Mobile
Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.
Mobile example
Stacked values on a phone
An expanded disclosure with long values at phone width.
Live demo. 1 native action works here and is verified by an outcome test.
Frames narrower than the selected width show the component at the width available.
What changes at narrow widths
Below 36rem each term/value pair stacks into one column with the value directly under its term.
Values use overflow-wrap: anywhere, so long references and service names wrap instead of widening the page.
The summary row keeps a 44px minimum height and the whole row toggles the disclosure on tap.
Orientation changes only reflow the rows; the order of terms does not change.
Click or tap the code once to select all of it, then copy.
Baseline
Mobile · 320px
The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.
Live demo. 1 native action works here and is verified by an outcome test.
Frames narrower than the selected width show the component at the width available.
API and configuration
Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.
Native and ARIA attributes
Attribute
On
Values
Default
Description
open
details
boolean
absent (collapsed)
Initial expanded state. The live state is owned by the browser; the user can always toggle it.
CSS hooks (derived from dist/all.css)
Hook
Kind
Values or default
Description
.forma-fault-details
Block class
—
Root native details element with top and bottom borders.
.forma-fault-details__boundary
Element class
—
Optional small note stating that only approved, sanitized values appear.
.forma-fault-details__content
Element class
—
Wrapper for the expanded content with bottom padding.
.forma-fault-details__list
Element class
—
Description list of approved term/value pairs; each pair is a div laid out as a two-column grid (terms at least 7rem) that stacks below 36rem.
Keyboard interaction
Keys
Result
Tab / Shift+Tab
Moves focus to and from the summary.
Enter / Space
Toggles the disclosure (native details behavior).
Events
Event
Description
toggle
Native event fired by details when it opens or closes. Forma attaches nothing to it; any on-demand loading must still return only approved, sanitized values.
Form behavior
Not a form control.
States
Fault details states
State
How it is expressed
Presentation
Collapsed
no open attribute
Only the summary row is visible.
Expanded
open / [open]
The approved values and optional boundary note are shown.
Focus
:focus-visible on summary
The shared two-tone focus ring on the summary row.
Accessibility
Forma provides
Keeps the platform details/summary semantics, so the expanded state and keyboard toggling come from the browser.
Gives the summary a 44px minimum height and pointer cursor.
Uses description-list semantics so terms and values are announced as pairs.
Keeps borders and the boundary note visible as CanvasText in forced-colors mode.
Your application supplies
Build a separate audience-safe view model and render only its fields; never bind raw fault records.
Keep the reference, message and recovery actions outside the disclosure so they are never hidden.
Write a summary label that says what is inside ("Safe diagnostic details").
The summary uses a flex layout, which can suppress the native disclosure triangle; if your audience needs a visible expanded/collapsed cue, state it in the summary text or supporting copy.
Responsive behavior
Rows are a two-column grid (minmax(7rem, auto) minmax(0, 1fr)) on wide viewports.
Below a 36rem viewport each row stacks into one column with a small gap.
Values break anywhere, so long references and names never overflow at 320px.
Motion
No animation: the native details element opens and closes instantly. The component is not part of the physics motion set, so nothing slides or fades.
Usage guidance
Do
Keep the list short and meaningful to the audience.
Include the reference again inside the details when support staff read the expanded view.
Avoid
Rendering stack traces, exception details, secrets, tokens, internal paths, raw context or breadcrumbs.
Hiding recovery actions or the only copy of the reference inside the disclosure.