C-45 · Components · Versioning
All elements · VersionRetention on the Components page
Last checked 2026-10-22 · Awaiting approval · Accessibility tests
Approve VersionRetention
Approving as
VersionRetention
C-45WCAG 2.2 AA · PassedHow long Draft checkpoints are kept after the next Published version, for one classification and document type pair: inherit the rule, a number of days, or keep all. Shows the effective rule and where it comes from (this pair, the classification, or the product default). Records managers edit it; everyone else sees it read only.
| Axis / element | Values | ||
|---|---|---|---|
__choice · __legend · __option · __hint ·
__days
|
a radio group; data-retention = inherit · days · keep-all on each radio |
||
__effective (a role="status" box around a |
__effective (<dl>)lt;dl |
__effective (<dl>)gt;) · __value ·
__source
|
the effective rule and its source, a polite live region |
data-inherited-value · data-inherited-source ·
data-pair-name
|
what the effective rule reads when the pair inherits | ||
__note · __actions |
what is never pruned / Save |
Guidance
When to use
- Use it in records management settings for one classification and document type pair to set how long Draft checkpoints are kept after the next published version.
-
Offer three choices on radios with
data-retention: inherit, days and keep-all; the days field is enabled only for days. -
Always show the effective rule (
__value) and where it comes from (__source): this pair, the classification or the product default.
When to consider something else
- For a record's retention schedule and disposition, use the record policy Form; this only prunes draft versions. See Form.
- To show the rule without editing, render the same markup with the fieldset disabled and say who can change it. See ObjectDisplay.
Usability
- Name the pair in the legend ("Draft versions of Assessment report in Claims").
- Show what inheriting would give in the inherit option's
__hint. -
Say what is never pruned in
__note: published and superseded versions, the latest version, records and holds. - Explain that the most conservative rule wins when a document belongs to several classifications.
- Don't accept 0 or a negative number of days; use Keep all draft versions instead of a very large number.
- Don't hide the effective rule when the pair inherits.
Accessibility
Keyboard
| Keys | Action |
|---|---|
| Arrow keys | Move between the three choices (native radio group). |
| Tab | Moves from the chosen radio to the days field (when enabled), then to Cancel and Save. |
Roles and names
-
The choices are a
<fieldset>with a<legend>; the days field is named byaria-label("Days to keep drafts") and hasaria-describedbyon its unit text. -
The effective rule is a
<dl>inside__effectivewithrole="status", so a change of choice is announced politely. -
Read only: the fieldset and each radio are
disabledandaria-describedbypoints at the note that says who can change it.
Focus
- Choosing Delete drafts after a number of days leaves focus on the radio; the days field is next in tab order.
Other requirements
-
The days field is a number input with
min,maxandinputmode="numeric"; errors use the Field's invalid state.
Test your implementation too. This guidance covers the element as specified here. How a screen composes it (labels, order, announcements) still needs its own keyboard and screen reader check.
Accessibility tests
Passed the gate (run 358b316 on 2026-10-22): no finding in any theme. Awaiting a person’s approval of the checklist below.
| Area | Automated | A person checks |
|---|---|---|
| General | Passed | Color is never the only cue, text alternatives say the same thing as the graphic, and the element reads the same in the light and the dark theme. |
| Zoom | Passed | At 200% zoom, at 320 CSS pixels wide and with the WCAG text-spacing overrides, nothing is lost, clipped or overlapping. |
| Keyboard | Passed | Every row of the Keyboard table works, focus is always visible and never trapped, and the tab order follows the reading order. (2 rows) |
| Screen reader | Passed | With NVDA or JAWS on Windows and VoiceOver on macOS, names, roles and states are announced as Roles and names says, and changes are announced once. (3 items) |
Approving. When the checklist passes on the checked run, record it with
bun run a11y:approve -- version-retention --by "Your name" and commit
a11y/approvals.json with the rebuilt pages.
All test status
Package
Consumers link one stylesheet, css/classic/index.css, which includes every element. The
files below are where this element is defined.
Latest updates
| Date | Version | Breaking | Description |
|---|---|---|---|
| 2026-10-08 | 0.1 | No | VersionRetention (.qf-retention): draft-version retention for a classification and document type pair (inherit, days, keep all) with the effective rule and its source (QF-10840) |