Skip to main content
INSTALLATION // EXTENSION, CDN, NPM & CI QUALITY GATE

Deploy across every environment

lens-a11y@0.1.2 // View on npm ↗
RECOMMENDED FOR EXTERNAL SITES (BYPASSES CSP)

1. Chrome / Brave Manifest V3 Extension (packages/extension)

Major websites like Google Search, Wikipedia, and GitHub enforce strict Content-Security-Policy (CSP) headers that block javascript: bookmarklets. Our Manifest V3 extension runs lens.min.js inside an isolated content-script world so the HUD mounts cleanly on any website on the internet.

  1. 1. Run pnpm --filter lens-a11y build (bundles packages/extension/lens.min.js).
  2. 2. Open brave://extensions (or chrome://extensions) and enable Developer mode (top right).
  3. 3. Click Load unpacked and select your D:\Aperture\packages\extension folder.
  4. 4. Open Wikipedia, Google, or any site and click the Aperture puzzle icon in your browser toolbar!

2. Package Manager (React, Next.js, Vite, Vue)

npmjs.com/package/lens-a11y ↗
terminal & app.tsx
# Install via npm, pnpm, or yarn
npm install lens-a11y
pnpm add lens-a11y

// Mount in development mode inside your root layout or entry file
import { Lens } from "lens-a11y";

if (process.env.NODE_ENV === "development") {
  Lens.mount({ position: "bottom-right", theme: "auto" });
}

3. One-Line CDN Script Tag (jsDelivr)

index.html
<!-- Auto-mounts Floating HUD on your own websites -->
<script src="https://cdn.jsdelivr.net/npm/lens-a11y@0.1.0/dist/lens.min.js" data-lens="auto"></script>

<!-- Or boot directly into a specific simulation -->
<script src="https://cdn.jsdelivr.net/npm/lens-a11y@0.1.0/dist/lens.min.js" data-lens="protanopia"></script>

4. Automated CI / CD Accessibility Gate (Vitest / Playwright)

a11y-ci.test.ts
import { expect, test } from "vitest";
import { runDomAudit, getContrastRatio, parseColor } from "lens-a11y";

test("enforces 100/100 WCAG audit score before merge", () => {
  const report = runDomAudit(document);
  expect(report.issues).toEqual([]);
  expect(report.score).toBe(100);
});