DR-009behavioral

Rule of State Honesty

System status reflects the available evidence.

Markdown · Rule index (JSON)

Requirement

Loading, empty, filtered-out, unavailable, stale, pending, and completed states must remain distinguishable when they call for different user actions. Do not turn a failed request into an observed zero or a queued operation into a completed one. If retained data affects a decision, distinguish its as-of time from the latest refresh attempt.

Why

A decision based on a false success or false absence can be wrong even when the layout is clear. This extends DR-004 from data representation to the interface's operational state. Visibility of system status is practitioner guidance; WCAG 4.1.3 addresses programmatic identification of qualifying status messages, not backend truth.

Application

Keep useful retained data explicitly labeled stale after a failed refresh; offer retry. Show submitting, queued, and completed according to actual operation evidence. Announce meaningful status changes without unnecessarily moving focus or making every update an interrupting alert. Snapshot application: Present the value, its stale qualifier, and its as-of context as one reading unit. Keep the refresh attempt separate. A pending retry or another failure must not replace a known snapshot with zero, advance its as-of time, or imply recovery. Only the returned successful snapshot updates its value and time. Initial loading has no retained snapshot to display. Keep recovery local and preserve focus on the invoking control while the request resolves.

Exception

Omit distinctions that do not affect this task, but never claim a stronger state than the available evidence supports. Optimistic UI must expose pending status or support truthful reconciliation and failure recovery.

Review

Exercise delayed, empty, failed, and recovered responses with controlled fixtures. Visible labels and ARIA metadata do not establish freshness or completion.

Examples

The pair isolates this rule. A good example is not approval of the entire interface.

Good for this task

Bad for this task

Review notes and sources

What this example establishes

Other valid choices

Exception

Sources and scope

    Enforcement

    behavioral is the strongest mechanism Viewrule expects for the complete rule. Partial checks can still provide supporting evidence without proving the whole requirement.

    Detection and enforcement details →