Skip to content

VersionRetention

C-45 · Components · Versioning

All elements · VersionRetention on the Components page

Last checked 2026-10-22 · Awaiting approval · Accessibility tests

Copies the bun run a11y:approve command for VersionRetention.

VersionRetention

C-45WCAG 2.2 AA · Passed

How 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
Editable (records manager) and read only
Draft versions of Assessment report in Claims

90 days, the product default. Claims sets no rule of its own.

days after the next published version
Effective rule
30 days after the next published version
Set by
Set here (Claims · Assessment report)

When a document belongs to more than one classification, the longest rule wins and Keep all beats any number. Published and superseded versions, the latest version, records under retention and anything under a legal hold are never pruned.

Draft versions of Invoice in Accounts payable

Keep all, from the classification Finance.

Effective rule
Keep all draft versions
Set by
Classification: Finance

Only records managers can change this rule.

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

Do
  • 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
  • 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

VersionRetention 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 by aria-label ("Days to keep drafts") and has aria-describedby on its unit text.
  • The effective rule is a <dl> inside __effective with role="status", so a change of choice is announced politely.
  • Read only: the fieldset and each radio are disabled and aria-describedby points 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, max and inputmode="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

WCAG 2.2 AA · Passed

Passed the gate (run 358b316 on 2026-10-22): no finding in any theme. Awaiting a person’s approval of the checklist below.

VersionRetention test checklist
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.

VersionRetention package
Source css/classic/components/versions.css
Specimens also use Box · Button · Card · Chip · Control · Field · Table · Text · Toggle · Toolbar
Sprites —
React Not yet available: the React binding has not started.

Latest updates

VersionRetention 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)

All release notes