Abilyo by WebAbility

Core SDK

The accessibility scanner engine. 59 detectors, 200+ WCAG rules, fix suggestions.

Install

npm install @webability/core playwright

Quick Start

import { scan } from '@webability/core'
 
const result = await scan('https://example.com')
 
console.log(result.summary)
// { total: 12, critical: 1, serious: 3, moderate: 8, minor: 0 }
 
for (const issue of result.issues) {
  console.log(`[${issue.impact}] WCAG ${issue.wcag}: ${issue.message}`)
  if (issue.fix?.suggestedValue) {
    console.log(`  Fix: ${issue.fix.attribute}="${issue.fix.suggestedValue}"`)
  }
}

Scan Options

const result = await scan('https://example.com', {
  wcagTags: ['wcag2aa', 'wcag21aa'],
  rootSelector: '#main-content',
  viewport: 'mobile',       // 'desktop' | 'tablet' | 'mobile'
  dismissModals: true,      // dismiss cookie banners
  browser: { headless: true, timeout: 30000 },
})

Scan a Live Page

// Pass an existing Playwright or Puppeteer page
const result = await scan(page)

HTML Reports

import { scan, toHtmlReport } from '@webability/core'
import { writeFileSync } from 'fs'
 
const result = await scan('https://example.com')
writeFileSync('report.html', toHtmlReport(result))

Result Shape

interface ScanResult {
  url: string
  timestamp: string
  issues: ScanIssue[]
  summary: {
    total: number
    critical: number
    serious: number
    moderate: number
    minor: number
  }
}
 
interface ScanIssue {
  id: string
  type: string          // e.g. 'missing_alt', 'contrast_insufficient'
  wcag: string          // e.g. '1.1.1', '1.4.3'
  level: 'A' | 'AA' | 'AAA'
  impact: 'critical' | 'serious' | 'moderate' | 'minor'
  message: string
  selector: string
  html?: string
  fix?: {
    attribute: string
    currentValue: string
    suggestedValue?: string
    needsManualReview: boolean
  }
}

WCAG Coverage

59 detectors covering 30+ WCAG 2.1 AA success criteria:

  • 1.1.1 Non-text Content (alt text, SVG names, decorative images)
  • 1.3.1 Info and Relationships (headings, landmarks, labels, tables)
  • 1.4.3 Contrast Minimum (text and non-text contrast)
  • 2.1.1 Keyboard (keyboard traps, JS links)
  • 2.4.7 Focus Visible (actual focus state testing)
  • 2.5.8 Target Size (with WCAG spacing exception)
  • And 24+ more criteria

On this page