JS Integration with Litemode

Use JavaScript to start A11yWatch Lite on your local machine and test out an early slimmed-down version of the software.

Easy plug-and-play on any machine with Node.js

Scan a single page or entire websites in one go using efficient streams.

JavaScript Integration

Use npm or your favorite JavaScript package manager to install the Lite OS suite.

// npm install @a11ywatch/a11ywatch
import { scan, multiPageScan } from "@a11ywatch/a11ywatch";

// single page website scan.
const results = await scan({ url: "https://a11ywatch.com" });
console.log(results);
// multi page website scan.
const resultsAll = await multiPageScan({ url: "https://a11ywatch.com", subdomains: false });
console.log(resultsAll);

A11yWatch API Client

// npm install @a11ywatch/a11ywatch
import { setAPIToken, setA11yWatchURL, crawlWebsite, scanWebsite } from "@a11ywatch/a11ywatch/client";

setAPIToken(process.env.A11YWATCH_TOKEN);
setA11yWatchURL("https://api.a11ywatch.com");

// single page website scan.
const audit = await scanWebsite({ url: "https://mywebsite.com" })
console.log(audit);

// multi page website scan.
await crawlWebsite({ url: "https://mywebsite.com" }, (audit) => { 
  console.log(audit)
});

Related Posts

Stay inclusive with confidence

Get started with A11yWatch now for affordable and speedy automated web accessibility tools.