JSPM

@onaccessible/cli

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q66256F
  • License MIT

CLI for ON ACCESSIBLE WCAG 2.2 accessibility audits — headless browser, pixel contrast, CI gates

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@onaccessible/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @onaccessible/cli

    Run WCAG accessibility audits from the terminal or CI.

    Requires a Premium API token from Portal → API & Webhooks.

    Install

    Published on npm as @onaccessible/cli.

    npm install -g @onaccessible/cli
    # or run without install:
    npx @onaccessible/cli audit https://example.com --help

    From this repo without publishing:

    node packages/cli/bin/onaccessible.mjs audit https://example.com ...

    Quick start

    export ONACCESSIBLE_API_TOKEN="oa_…"
    export ONACCESSIBLE_ANON_KEY="eyJ…"   # Supabase publishable key (see docs/api)
    
    onaccessible audit https://example.com
    onaccessible audit https://example.com --min-score 90 --max-critical 0
    onaccessible audit https://example.com --json --details
    onaccessible audit https://example.com --mobile-viewport --min-score 85
    onaccessible audit https://app.example.com/dashboard --cookie-header "session=…"

    Options

    Flag Description
    --min-score Exit 1 if score below threshold
    --max-critical Exit 1 if critical count exceeds limit
    --max-serious Exit 1 if serious count exceeds limit
    --mobile-viewport Second headless pass at 390×844
    --cookie-header Scan behind login (Premium API)
    --ai Advanced AI audit
    --no-headless Static HTML fetch only
    --json / --details Full API response

    Summary output (default)

    Without --details, the API still returns enrichments the CLI prints when present:

    • categoryScores — POUR principle breakdown
    • viewportProfiles.mobile — mobile score, categoryScoreDeltas, mobile pixelContrast
    • screenReaderPreview.regression — desktop vs mobile announcement diff counts
    • historicalRegression — diff vs your prior snapshot for the same URL (2nd+ scan)
    • pixelContrast — desktop computed-style contrast sampling

    CI example

    - run: npx @onaccessible/cli audit https://example.com --min-score 90 --max-critical 0
      env:
        ONACCESSIBLE_API_TOKEN: ${{ secrets.ONACCESSIBLE_API_TOKEN }}
        ONACCESSIBLE_ANON_KEY: ${{ secrets.ONACCESSIBLE_ANON_KEY }}

    Or use the bundled GitHub Action from this repo.

    Exit codes

    Code Meaning
    0 Scan passed thresholds
    1 Scan failed thresholds or API error
    2 Invalid usage