DOM

@generative-a11y/dom

Browser announcements, runtime connections, safe focus helpers, attention tracking, and validated preference storage.

Install browser delivery

DOM uses core without depending on React or an AI framework.

shell
npm install @generative-a11y/core @generative-a11y/dom

How this code works

  1. 01
    Prepare updates in core

    Core prepares announcements without using browser globals.

  2. 02
    Add updates to the page

    DOM uses ariaNotify when available and falls back to hidden live regions.

Public export map

Choose direct announcing or bind an existing runtime.

CategoryExportsReference
DeliverycreateDOMAnnouncer/api/dom/create-dom-announcer
Runtime bindingconnectRuntimeToDOM/api/dom/connect-runtime-to-dom
FocuscaptureFocus, focusElement, restoreFocus/api/dom/focus
AttentioncreateAttentionStore/api/dom/attention
PreferencescreatePreferenceStore and mapping helpers/api/dom/preferences