Honest accessibility note
No overlay or widget makes a website ADA or WCAG compliant on its own. Accessibility starts with semantic HTML headings, checked color contrast, labeled controls and full keyboard navigation. We built <leo-a11y-widget> as a fast, free companion layer so visitors with low vision, dyslexia, light sensitivity or motion sensitivity can adjust reading comfort on top of clean markup—without paying $49–$199/month for bloated vendor scripts.
Try every control live on this page
This exact widget is running right now in the bottom-left corner of this page. Press Alt + A (or click the button above) and test the controls against the sandbox block below:
Interactive test card
Toggle Reading or Vision presets, test WCAG 1.4.12 Text Spacing, try Highlight Links on our med spa pricing guide and the GitHub repository, or click Read Page to hear this paragraph read aloud via the browser's Web Speech API.
Open-source widget vs. paid accessibility overlays
Small businesses and clinic owners are frequently pitched $49 to $199/month accessibility overlay subscriptions that add heavy third-party scripts and dubious compliance promises. Here is the plain side-by-side difference:
| Criteria | Leo Accessibility Widget | Paid Overlays (AccessiBe / UserWay) |
|---|---|---|
| Price & License | $0 forever (MIT open source) | $49–$199+/month recurring subscription |
| Bundle Size | 13.5 KB gzipped (+ 0.3 KB preload) | 100 KB–300 KB+ third-party bundles |
| Tracking & Privacy | Zero network calls; localStorage only | External vendor servers & analytics |
| Style Isolation | Shadow DOM — zero CSS conflicts | Global DOM scripts & style overrides |
| Modern Frameworks | Vanilla HTML, Astro View Transitions, React, Next.js | Generic script injection |
| White-Label Option | Built-in (data-hide-credit="true") | Paid tier required to hide branding |
Quick start (1-line CDN or self-hosted)
Drop the optional 337-byte anti-FOUC preload script in <head> and load the main widget with defer before </body>:
<!-- Optional anti-FOUC preload in <head> (337 B gzipped) -->
<script src="https://cdn.jsdelivr.net/gh/leowebstudio/accessibility-widget@v1.0.0/dist/a11y-preload.min.js"></script>
<!-- Accessibility Widget before </body> (13.5 KB gzipped) -->
<script src="https://cdn.jsdelivr.net/gh/leowebstudio/accessibility-widget@v1.0.0/dist/a11y-widget.min.js" defer></script> Astro (with ClientRouter / View Transitions)
Self-host dist/a11y-widget.min.js and dist/a11y-preload.min.js inside public/widgets/. Both scripts listen for astro:after-swap and astro:page-load automatically:
<!-- src/layouts/Layout.astro -->
<head>
<script is:inline src="/widgets/a11y-preload.min.js"></script>
</head>
<body>
<slot />
<script is:inline src="/widgets/a11y-widget.min.js" defer></script>
</body> React / Next.js (App Router)
// app/layout.tsx
import Script from 'next/script';
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script src="/widgets/a11y-preload.min.js" strategy="beforeInteractive" />
<Script src="/widgets/a11y-widget.min.js" strategy="afterInteractive" />
</body>
</html>
);
} Configuration & events
Customize the initial corner position or enable full white-label mode directly on the <script> tag (or on a manual <leo-a11y-widget> element):
| Attribute | Values | Default | Behavior |
|---|---|---|---|
data-position | left | right | left | Sets initial dock corner before a visitor chooses their own side. |
data-hide-credit | true | false | false | Hides the optional footer attribution link for white-label builds. |
leo-a11y:state | CustomEvent | — | Dispatched on window with { detail: { open } } for coordinating with chat widgets. |
Frequently asked questions
Is this a free open-source alternative to AccessiBe or UserWay?
Yes, for visitor display and reading controls—font scaling, contrast modes, WCAG 1.4.12 text spacing, link highlighting, animation pausing, reading guide, and browser text-to-speech. It is MIT licensed ($0), weighs 13.5 KB gzipped, sends zero tracking requests, and never claims to replace semantic accessible code.
Does adding this widget make a website ADA or WCAG 2.2 AA compliant?
No. No overlay or script can legally guarantee ADA compliance or repair missing form labels, broken heading order, uncaptioned videos, or inaccessible third-party embeds. Build clean semantic markup first, then add this panel as an optional visitor comfort layer.
Does it impact Core Web Vitals (LCP, INP or CLS)?
No. The main script loads with defer (~13.5 KB gzipped), renders inside an isolated Shadow DOM, and causes zero layout shift. The optional 337-byte preload script runs in <head> solely to restore saved localStorage attributes before first paint.
Can I hide the footer credit on client websites?
Yes. Add data-hide-credit="true" to the <script> tag (or hide-credit on <leo-a11y-widget>) for full white-label deployment—no license key or paid tier required.