Skip to main content
ADA Enforcement Alert: Over 4,000 websites faced accessibility claims last year. Check your compliance in 30 seconds →
Accessibility Shield
FeaturesFree ScannerROI CalculatorPricingFAQBlogContact
Integration & Setup Guide

Widget Installation & Framework Integration

Step-by-step guide to installing the lightweight ~5KB Accessibility Shield widget across HTML, Next.js, Astro, Hugo, React, Nuxt, WordPress, Webflow, and Shopify.

Add the snippet to your site

< 5.0 KB

Pick your framework and paste the code into your project layout or custom code settings.

Changes reflect instantly in snippets below
html
<!-- Accessibility Shield Widget (~5KB, loads asynchronously) -->
<script
  src="https://accessibilityshield.org/widget.js"
  data-site-id="YOUR_SITE_ID"
  async
></script>
HTML Installation: Paste right before the closing </body> tag on all pages of your site.
Under 5.0 KB Minified

Zero bloat. Strictly enforced via automated CI bundle budget tests so your site keeps a 100/100 Core Web Vitals score.

WCAG 2.1 Compliant

Complete keyboard trap prevention, ARIA dialog semantics, high-contrast mode, and instant visitor barrier reporting.

Works on Every Stack

Native support for Astro, Next.js, Hugo, React, Nuxt, WordPress, Shopify, Webflow, or plain static HTML.

Accessibility Shield includes an ultra-lightweight on-site assistive toolbar (public/widget.js) designed to provide instant visual customizations (contrast toggles, text scaling, dyslexia-friendly fonts) and an integrated barrier reporting form for your website visitors.

Unlike bloated 300KB+ commercial overlays that inject tracking pixels, Accessibility Shield is compiled with pure vanilla TypeScript, enforces a strict < 6.0 KB bundle budget (~5KB minified, ~2KB gzipped), and loads asynchronously without delaying First Contentful Paint (FCP) or Largest Contentful Paint (LCP).


Technical Specifications

Feature Specification
Bundle Size 5.0 KB minified (~2.0 KB gzipped / brotli)
Load Strategy Asynchronous non-blocking (async / strategy="lazyOnload")
Runtime Dependencies 0 external npm packages (pure vanilla DOM)
Storage & Privacy User display preferences are saved only in client localStorage
Keyboard Accessibility Full WCAG 2.1 focus trapping, Escape to close, and ARIA dialog semantics
Supported Platforms Any web application, SSG, SPA, or CMS

Content Security Policy (CSP)

If your website uses a strict Content Security Policy (Content-Security-Policy HTTP header or <meta> tag), add our script and reporting endpoint origins to your directives:

Content-Security-Policy: 
  script-src 'self' https://accessibilityshield.org;
  connect-src 'self' https://accessibilityshield.org;
  style-src 'self' 'unsafe-inline';
  • script-src: Allows loading the widget script (widget.js).
  • connect-src: Enables visitors to submit barrier reports to POST https://accessibilityshield.org/api/report.
  • style-src 'unsafe-inline': The ~5KB widget injects isolated inline styles to render the floating action button and modal dialog without triggering extra stylesheet network roundtrips.

Verification & Troubleshooting

Once you have deployed the snippet:

  1. Verify Live: Visit your website in an incognito browser window. Look for the blue floating shield button in the bottom-right corner.
  2. Dashboard Verification: In your Accessibility Shield Dashboard, click Verify Widget. Our server-side scanner will inspect your homepage DOM and confirm active installation.
  3. Single Page Applications (SPAs): If your framework uses client-side page transitions (e.g. Astro View Transitions, Next.js App Router, or React Router), the widget automatically remains mounted in the DOM without requiring re-execution. For Astro, use data-astro-rerun to ensure smooth re-initialization.

Need your Site ID or automated scan reports?

Register a domain on Accessibility Shield to access continuous weekly audits and automated compliance verification.

Open Dashboard
Accessibility Shield

Continuous automated WCAG 2.1 AA audits, certified third-party accessibility statements, and safe-harbor barrier reporting for modern web teams.

Footer Navigation

Product

  • Automated Audits
  • Pricing & Plans
  • Free Audit Scanner
  • Lawsuit ROI Calculator
  • Compliance Guides

Trust & Security

  • About Our Mission
  • Security Architecture
  • Accessibility Statement
  • Contact Support

Legal & Policies

  • Privacy Policy
  • Cookie Policy
  • Terms of Service
  • 14-Day Refund Guarantee
© 2026 Accessibility Shield Inc. All rights reserved.·Zero-Tracking Platform · No cookies sold or tracked
Theme