JavaScript SDK
@incluxa/a11y-sdk is not published to npm yet, so the install commands and imports on this page show the planned API and will not work until it is released. To add the widget today, paste the script tag before </body> (see the script tag guide):The @incluxa/a11y-sdk npm package (coming soon) will give you programmatic control over every accessibility feature — profiles, presets, AI transforms, and usage analytics — from any JavaScript environment.
When to use the SDK vs script tag
The script tag is the fastest path to adding the INCLUXA accessibility toolbar to any site. No build step required.
The npm SDK is for teams who need deeper integration: building custom UI, programmatically applying presets per student, using AI content transforms in your own components, or building headless (no toolbar) implementations.
A11yProvider + useA11y() hook. Context-driven, React 18+ compatible.IncluxaA11y class. Works in any framework or plain HTML. No React dependency.Installation (coming soon)
Once the package is published, install it from npm:
npm install @incluxa/a11y-sdkWhat's included
| Export | Description |
|---|---|
| A11yProvider | React context provider — wraps your app, loads profile automatically |
| useA11y() | React hook — access enable/disable/toggle/applyPreset from any component |
| A11yToolbar | Pre-built React toolbar component |
| A11yReader | Text-to-speech reader component |
| A11yQuizToolbar | Accessibility toolbar optimised for quiz/assessment UIs |
| A11yPresetBar | Horizontal preset picker component |
| IncluxaA11y | Vanilla JS class — full SDK without React dependency |
| A11yClient | Low-level HTTP client (X-Api-Key auth) |
| generateAltText() | AI: generate alt text from image URL |
| simplify() | AI: simplify text to target reading level |
| rephrase() | AI: rephrase question/answer pair |
| getHints() | AI: get scaffolded hints for a question |
| extractVocabulary() | AI: extract vocabulary words from text |
API base URL
All SDK methods send requests to https://api.incluxa.com/api/v1 by default. Override with the apiUrl config option for self-hosted or staging environments.