generative-a11y
Core

Intents and diagnostics

Inspect prepared announcements and the runtime decisions that produced them.

AnnouncementIntent

An AnnouncementIntent describes an update prepared by core. It does not confirm that the browser delivered it or that a screen reader spoke it.

Inspect prepared announcements
import { createRuntime } from "@generative-a11y/core";

const runtime = createRuntime({
  onAnnouncement: (intent) => console.log(intent.sourceType, intent.channel),
  onDiagnostic: (diagnostic) => console.log(diagnostic.reason),
});

// Call runtime.dispose() when inspection ends.

Intent fields

Prop

Type

AnnouncementDiagnostic

Diagnostics record runtime decisions for tests and telemetry. Listener failures do not change runtime behavior. Repeated queue-limit decisions can share one diagnostic with a count.

DispositionTypical reasonsMeaning
queuedscheduledCandidate entered the scheduler
mergedcoalescedPending equivalent work was replaced
suppressed

duplicate, policy-silent, stale-response, stale-run, stale-step, partial-identity

Policy or identity prevented output
cancelledscope-cancelled, runtime-disposedPending work became invalid
announceddelivered, delivery-errorListeners accepted output or every attempt failed

Prop

Type

Versioned runtime observability

subscribeDiagnosticEvents emits each normalized source event before the decisions caused by that dispatch. getDiagnosticSnapshot returns current lifecycle and queue timing without response text, labels, errors, scopes, deduplication keys, or timer handles.

Prop

Type

Evidence and testing note

Runtime diagnostics explain library behavior. They do not prove DOM delivery or screen-reader speech.