@labmgm/a11y
v0.1.3
Published
Accessibility primitives for MGM Laboratory: VisuallyHidden, FocusScope, FocusTrap, live-region announcer.
Readme
@labmgm/a11y
Accessibility primitives.
pnpm add @labmgm/a11yimport { VisuallyHidden, Announcer, announce, FocusTrap, useFocusVisible } from '@labmgm/a11y';Exports
| Export | Purpose |
| ----------------------------- | -------------------------------------------------------------------------------------------------- |
| <VisuallyHidden> | Hide content visually while keeping it for screen readers (re-export from Radix). |
| <Announcer> | Mount once at the root. Renders polite + assertive live regions. |
| announce(message, urgency?) | Push a message to the live region from anywhere. |
| <FocusTrap> | Lightweight Tab / Shift+Tab trap. For full Radix-grade behavior use Dialog from @labmgm/react. |
| useFocusVisible() | True after the user's last interaction was via keyboard. |
License
MIT © MGM Laboratory
