# SummaryList

> Questions and their answers as a description list, one row per question with an optional action: for checking answers before submitting and for showing a submitted record.

- Status: alpha
- Group: display
- Page: https://www.digitaltableteur.com/design-system/components/summary-list
- Contract: https://www.digitaltableteur.com/contracts/v1/SummaryList.contract.json

## When to use

Questions and their answers as a description list, one row per question with an optional action: for checking answers before submitting and for showing a submitted record.

## When not to use

- Do not squeeze answers into columns side by side; one row per question.
- Do not use it for tables of several values per row.

## Look-alikes

The contract names no look-alike with a deciding condition.

## Props

| Prop | Type | Default | Description | Required |
| --- | --- | --- | --- | --- |
| `rows` | `SummaryListRow[]` | none | Rows in order. | Yes |
| `layout` | `"auto" \| "stacked"` | `auto` | "auto" stacks the label above the value in narrow containers and puts them side by side once the list is wide enough (about 40rem). | No |
| `className` | `string` | none | Merged onto the dl element. | No |

## Variants

- Available layouts: `auto`, `stacked` (default `auto`).

## Invalid combinations

The contract records no invalid combinations.

## Keyboard

| Key | Behaviour |
| --- | --- |
| General | Not interactive itself; row actions are reached with Tab in reading order. |

## Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

| Level | Rule | How it is checked |
| --- | --- | --- |
| MUST | ARIA: Renders a <dl>; each row is a <dt> label and a <dd> value, and an optional <dd> action. | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | ARIA: Row actions should name what they change ("Change" plus a visually hidden label). | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | Required stories produce no axe violations at the configured severity. | Automated by `npm run test:stories:matrix:ci`. WCAG 2.5.8. |
| MUST | The accessibility tree (role, name, state) matches the committed snapshot for every required story. | Automated by `npm run test:stories:matrix:ci`. WCAG 1.3.1, 4.1.2. |
| MUST | The component remains legible and operable under a real browser forced-colors: active pass. | Automated by `npm run test:stories:hc`. |
| MUST | Every documented keyboard interaction works as specified. | Not yet verified: no evidence record. WCAG 2.1.1, 2.1.2. |

## Install and import

- In-repo only. SummaryList is not exported from `@digitaltableteur/react`, so there is no public import path.
- Alpha components are internal and never exported.

## Links

- Machine-readable contract (Design System Contract 1.0): https://www.digitaltableteur.com/contracts/v1/SummaryList.contract.json
- Markdown version of this page: https://www.digitaltableteur.com/design-system/components/summary-list.md
- Component index as JSON: https://www.digitaltableteur.com/design-system/components.json
- All components: https://www.digitaltableteur.com/design-system/components
- Source: The implementation lives in a private repository. This page, its Markdown twin and the contract are generated from it at build time and are the public source of truth.
