Installation
A11yCore installs with a single script tag. The widget automatically initializes when the page is ready and begins scanning the DOM for accessibility issues.
Basic Installation
Add this script tag to your page's<head>element. Thedeferattribute ensures the script loads without blocking page rendering.
HTML
<script src="https://cdn.a11ycore.org/v1/a11ycore.min.js" data-key="YOUR_LICENSE_KEY" defer ></script>
Script Attributes
| Attribute | Required | Description |
|---|---|---|
| data-key | Yes | Your license key from the A11yCore dashboard. Required for license verification. |
| data-config | No | URL to a JSON configuration file for remote config loading. |
| data-debug | No | Set to "true" to enable console logging for debugging. |
| data-autoinit | No | Set to "false" to disable auto-initialization. Use with manual init. |
| defer | Recommended | Defers script execution until DOM is ready. Prevents render blocking. |
Subresource Integrity (SRI)
For enhanced security, add theintegrityattribute with the SHA-384 hash from your dashboard. The browser will verify the script hasn't been tampered with.
HTML with SRI
<script src="https://cdn.a11ycore.org/v1/a11ycore.min.js" data-key="YOUR_LICENSE_KEY" integrity="sha384-[HASH_FROM_DASHBOARD]" crossorigin="anonymous" defer ></script>
How Auto-Initialization Works
When the script loads, A11yCore automatically:
- Waits for the DOM to be ready (
DOMContentLoadedorreadyState === 'interactive') - Reads the
data-keyattribute from the script tag - Verifies your license with the A11yCore server
- Starts a MutationObserver to scan for accessibility issues
- Initializes the accessibility widget UI
- Sets up keyboard shortcut handlers (default:Alt+A)
License Key Required
Without a valid license key, A11yCore displays a watermark and some features may be limited. Get your key from thedashboardafter signing up.