NEURALNG

ACCESSIBILITY

Native switch semantics

A real checkbox carries browser focus, validation and form behavior while role=switch communicates the binary interface pattern.

Native foundation

The visually hidden input remains the interactive element. checked, disabled, required, name and inputValue map directly to native properties.

Accessible name

Project a concise visible label whenever possible. For icon-only or label-free composition, provide ariaLabel. onLabel and offLabel never replace the accessible name.

Keyboard

Tab focuses the switch and Space toggles it through native browser behavior. No custom key manager is required.

Readonly and disabled

Disabled removes interaction and focus. Readonly uses aria-readonly, stays focusable and restores the previous value when pointer or keyboard activation is attempted.

Field state

Inside NeuralField, the switch inherits its deterministic id, described-by chain, required, invalid, pending, disabled, readonly, fluid and unstyled state.

SSR and hydration

Stable APP_ID-based ids avoid random server markup. Rendering does not touch browser globals and interaction begins after hydration.