Extension points · Explicit boundaries

Official addons, separate by design

The core understands the addon contract but never imports official addon implementations. Applications import only the entries they use.

Separate import paths

import {
  createSessionRecoveryAddon
} from "a11y-form-submission-recovery/addons/session-recovery";

import {
  createSubmissionReferenceAddon
} from "a11y-form-submission-recovery/addons/submission-reference";

import {
  createServerErrorMapperAddon
} from "a11y-form-submission-recovery/addons/server-error-mapper";

import {
  createFailureSupportSummaryAddon
} from "a11y-form-submission-recovery/addons/failure-support-summary";

Each path has its own JavaScript and declaration build. Importing the package root does not statically include these implementations.

Responsibilities

Session recovery

Saves an allowlisted, filtered snapshot in session storage and supports prompt, automatic, or manual restore modes. Manual mode exposes private controller commands for application-owned buttons.

Submission reference

Creates a non-personal correlation identifier, adds it to a header and optional field, and reuses it for retries.

Server error mapper

Passes a bounded cloned response to an application mapper and returns normalized validation or server outcomes.

Failure support summary

Shows selected attempt metadata in a persistent, static section without exposing form values, response content, or headers. Open the demo and guide.

Combined addon demo

Submit a normal email for success. Include the word invalid in the email to receive mapped server validation.

Submission reference: Not generated

Mapped field errors: None