test: cover sharing accessibility states

The shared-record accessibility suite had four tests for five states: success
and empty shared one, and neither of them ever entered an empty state. A
browser run reports what it ran and never what it did not, so a state nobody
wrote a test for produced exactly the same output as a state that passed.

The five states are enumerated in a fixture, each test names its state, and a
fast guard reads the spec back against the list — a state that loses its test,
its anchor, or one of its proofs now fails in the ordinary gate rather than at
the point somebody notices the spinner is silent.

Every state runs four proofs: an axe scan, the document reading order, either
a keyboard reach with a visible focus indicator or a live-region announcement
for the one state with nothing to press, and, where the copy is something a
person has to act on, that it renders as content rather than as muted meta and
clears the contrast floor. The retry control on the read-failure card gained a
stable slot so the keyboard proof targets the affordance rather than its
wording.

The eight release journeys are enumerated in the same fixture.
This commit is contained in:
Marc-André Bombeck committed 2026-08-06 23:46:43 +02:00
1 parent 71ad8d66b6
commit 0cdfb97a45
4 files changed
+686 -11

No files matched your search

+10 -1
View File
@@ -48,7 +48,16 @@ export function QueryErrorCard({
<p className="text-muted-foreground text-sm">{description}</p>
) : null}
{onRetry ? (
<Button variant="outline" size="sm" onClick={onRetry}>
// The slot is the accessibility suite's handle on the one control
// this card offers: the error state has to be recoverable by
// keyboard, and asserting that against viewport text would pin the
// copy instead of the affordance.
<Button
data-slot="query-error-retry"
variant="outline"
size="sm"
onClick={onRetry}
>
<RotateCw className="h-3.5 w-3.5" aria-hidden="true" />
{retryLabel ?? t("common.retry")}
</Button>