JSPM

  • Created
  • Published
  • Downloads 443
  • Score
    100M100P100Q97981F
  • License MIT

Regulatory accessibility test engine with Virtual DOM and Shadow DOM support

Package Exports

  • @holmdigital/engine

Readme

@holmdigital/engine

Regulatory accessibility test engine with Virtual DOM and Shadow DOM support.

This engine bridges the gap between technical accessibility scanning (using axe-core) and legal compliance reporting (EN 301 549). It provides prescriptive remediation advice and localized reporting.

Features

  • Regulatory Mapping: Maps technical failures to EU laws.
  • HTML Structure Validation: built-in html-validate checks for semantic correctness.
  • Internationalization (i18n): Supports English (en), Swedish (sv), German (de), French (fr), Spanish (es), and Dutch (nl). Supports region-specific rules (e.g. en-us, en-gb).
  • Pseudo-Automation: Generates Playwright test scripts for manual verification.
  • PDF Reporting: Generates beautiful, compliant PDF reports.

Installation

npm install @holmdigital/engine

CLI Usage

npx hd-a11y-scan <url> [options]

Options:

  • --lang <code> - Language code (en, sv, de, fr, es, nl, en-us, en-gb)
  • --ci - Run in CI mode (exit code 1 on failure)
  • --json - Output results as JSON
  • --pdf <path> - Generate a PDF report
  • --viewport <size> - Set viewport size (mobile, tablet, desktop, or custom 1024x768)
  • --generate-tests - Generate Pseudo-Automation tests
  • --api-key <key> - API Key for HolmDigital Cloud (sends results to dashboard)
  • --cloud-url <url> - Custom URL for HolmDigital Cloud API (default: https://cloud.holmdigital.se)

Programmatic Usage

import { RegulatoryScanner } from '@holmdigital/engine';
import { setLanguage } from '@holmdigital/engine/dist/i18n';

// Initialize Scanner
const scanner = new RegulatoryScanner({
  url: 'https://example.com',
  failOnCritical: false
});

// Set Language context (optional, defaults to 'en')
setLanguage('sv');

// Run Scan
const result = await scanner.scan();

console.log(`Score: ${result.score}`);

License

MIT © Holm Digital AB