NEURALNG
ACCESSIBILITY

A real dialog, not a simulated overlay

Native semantics, browser focus containment and deterministic application policy work as one contract.

Native semantics

The host renders a real <dialog>. Modal mode uses showModal(), enters the browser top layer, exposes aria-modal="true" and makes the remaining document inert.

Accessible name and description

Prefer ariaLabelledby pointing to a visible heading. Use ariaLabel only when no visible heading exists, and connect supporting copy through ariaDescribedby.

Focus lifecycle

neuralDialogInitialFocus targets the most useful first control after opening. Native modal focus remains contained and the exact opener regains focus after closing.

Keyboard

Tab / Shift+Tab

Navigate native focus order inside a modal.

Escape

Closes only when policy allows and reports escape.

Dismiss policy

When Escape or backdrop dismissal is disabled, always provide an obvious keyboard-operable action. closable="false" must never create a dead end.

SSR and hydration

The server emits a closed dialog. Browser-only top-layer, active-element and focus calls run after hydration; an initially true model opens safely when the native element exists.