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

AttributeRequiredDescription
data-keyYesYour license key from the A11yCore dashboard. Required for license verification.
data-configNoURL to a JSON configuration file for remote config loading.
data-debugNoSet to "true" to enable console logging for debugging.
data-autoinitNoSet to "false" to disable auto-initialization. Use with manual init.
deferRecommendedDefers 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:

  1. Waits for the DOM to be ready (DOMContentLoadedorreadyState === 'interactive')
  2. Reads thedata-keyattribute from the script tag
  3. Verifies your license with the A11yCore server
  4. Starts a MutationObserver to scan for accessibility issues
  5. Initializes the accessibility widget UI
  6. 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.