A11y Form Validator Lifecycle events

Integration demo

Lifecycle Events

Observe typed, bubbling lifecycle events without turning a developer log into assistive-technology noise.

Back to demo gallery

Try lifecycle transitions

Use admin to produce an async field error. Save Draft and Publish preserve different submitter values.

Demo status

No command has run yet.

Delegated event log

This visual debug log is intentionally not a live region and never receives focus.

    Developer notes

    The parent section subscribes before initialization, so it observes init and every later bubbling event. Event handlers are observations; commands still use validator methods.

    Typed subscription

    validator.events.on(EVENTS.errorsChanged, (event) => {
      console.log(event.detail.source, event.detail.errors);
    });

    Delegated DOM listener

    root.addEventListener(EVENTS.fieldPending, (event) => {
      console.log(event.target, event.currentTarget);
    });