Skip to main content

ON ACCESSIBLE - Free WCAG website accessibility scanner and assistive widget

    Developers

    Scan API & CI tools

    Premium programmatic scans, webhooks, a CLI for local and CI use, and a GitHub Action to gate deployments on automated WCAG 2.2 checks: axe-core in real Chrome plus keyboard, reflow, text-spacing and focus checks.

    Authentication

    Create a token in Portal → API & Webhooks. Premium plan required. Rate limit: 60 requests/hour per token.

    • Authorization: Bearer oa_…
    • apikey: eyJhbGciOiJI… (Supabase publishable key)

    POST /scan-api

    curl -X POST "https://auth.onaccessible.com/functions/v1/scan-api" \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZ4a2Z3d2dmemFuZHV2c3pmbGl2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODEwNTE0OTUsImV4cCI6MjA5NjYyNzQ5NX0.bj6Q7gMGLXhWWK_CgUPa1MDxvvPMUjHhRVmiJQjSiCM" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://example.com","details":false}'

    Request body fields: url (required), profile, useAI (advisory AI suggestions; never changes the score or status), mobileViewport, scanAuth, details (full payload: one entry per rule in violations, incomplete and passes, plus the per-criterion wcag report).

    profile (default full; any other value is a 400): full runs axe-core plus the contrast, motion, reflow, text-spacing and keyboard checks, and the mobile pass when mobileViewport is true. standard runs the same checks with smaller budgets and no mobile pass. quick runs axe-core, the static checks and the screen-reader preview only, so its coverage is never "full real-browser checks".

    headless is a legacy option: keep the default true. headless: false runs only the markup checks without a browser, so the result is always a limited scan whose score is not comparable with other scores.

    Response (summary mode)

    score
    Automated score 0–100: weighted axe-core A/AA rules (scoreModel v3-axe-weighted), capped at 69 with any automated Level A failure and at 89 with any automated Level AA failure. Show it as N/100. null when the scan is limited; never treat null as 0.
    level
    Automated status text (one of the four strings below). Not a conformance level.
    automatedStatus
    Machine-readable status: limited, level_a_failures, level_aa_failures or no_automated_a_aa_failures.
    coverage
    Which checks ran: "full real-browser checks", "axe-core only", or null (legacy markup checks). Show it next to the status.
    scoreModel
    v3-axe-weighted or legacy-markup. Scores from different models are not comparable.
    conformanceClaim
    Always false.
    limitedReasons
    Why a scan is limited, e.g. legacy_driver, login_redirect, blocked, too_few_applicable_rules.
    engine
    Engine version, axe-core version, driver and profile.
    criteria / levels
    Per WCAG level (A, AA, AAA): criteria failed, to review, with no automated failures, manual only, and how many have automated checks.
    summary
    totalIssues and critical…minor count failing A/AA elements (same meaning as before). summary.rules counts rules: failed, by impact, AAA, best practice, review.
    disclaimer
    The text to show with the results.

    Also returned when available: categoryScores (POUR principles, N/100 or null), viewportProfiles.mobile, screenReaderPreview.regression and historicalRegression (omitted when the score is null or the previous scan used a different score model). pixelContrast is no longer returned.

    Automated status

    Automated status values returned in level and automatedStatus
    levelautomatedStatusMeaning
    Limited scan — results incompletelimitedThe real-browser checks did not run or could not test enough of the page (legacy markup checks, blocked or sign-in page, too little content). See limitedReasons.
    Level A failures detectedlevel_a_failuresA definite automated failure on at least one A-level success criterion.
    Level AA failures detectedlevel_aa_failuresNo A-level failures, and a definite automated failure on at least one AA-level success criterion.
    No automated A/AA failures — manual review requiredno_automated_a_aa_failuresNo automated A/AA failures. Manual review is still required for every criterion.

    level is an automated status, not a conformance level, and conformanceClaim is always false. Automated testing finds a subset of accessibility issues. It cannot determine WCAG conformance or legal compliance. All 86 WCAG 2.2 success criteria need human verification.

    {
      "ok": true,
      "score": 69,
      "level": "Level A failures detected",
      "automatedStatus": "level_a_failures",
      "coverage": "full real-browser checks",
      "scoreModel": "v3-axe-weighted",
      "conformanceClaim": false,
      "engine": { "version": "3.0.0", "axeVersion": "4.14.0", "driver": "cf-binding", "profile": "full" },
      "criteria": { "A": { "failed": 5, "review": 5 }, "AA": { "failed": 10, "review": 1 }, "AAA": { "failed": 6, "review": 0 } },
      "levels": { "A": { "total": 31, "failed": 5, "needsReview": 5, "manual": 14, "withAutomatedChecks": 17, … }, … },
      "summary": {
        "totalIssues": 30, "critical": 4, "serious": 25, "moderate": 1, "minor": 0,
        "passed": 37, "incomplete": 12,
        "rules": { "failed": 18, "critical": 4, "serious": 13, "moderate": 1, "minor": 0, "aaa": 5, "bestPractice": 4, "review": 12 }
      },
      "disclaimer": "Automated testing finds a subset of accessibility issues. It cannot determine WCAG conformance or legal compliance. All 86 WCAG 2.2 success criteria need human verification. Automated checks touched 37; 49 have no automated test."
    }

    Errors

    Error bodies are { "error": "…", "code": "…", "details": … }. code is present when there is a machine-readable reason; branch on it, not on the error text. details carries the scanner's own error body when there is one.

    Scan API error responses by HTTP status and code
    HTTP statuscodeMeaning
    400noneurl is missing, or profile is not full, standard or quick.
    400SSRF_BLOCKEDThe URL points to a private or internal address.
    401 / 403noneMissing or invalid token / Premium plan required.
    429noneMore than 60 requests in the last hour for this token.
    500noneUnexpected error in the API itself.
    502TARGET_HTTP_ERROR, NAVIGATION_FAILED, NOT_HTML, FETCH_FAILED, FETCH_TIMEOUT, BOT_CHALLENGE, BLOCKED_PAGEThe scanned site failed (details.upstreamStatus has its HTTP status when known).
    502SCAN_FAILED, SCAN_BAD_RESPONSEThe scanner failed, or answered with something that is not a scan result. No code: the scanner could not be reached.
    503SCAN_TIMEOUTNo time was left to start the scan. Nothing was scanned; retry.
    504SCAN_TIMEOUTThe scan did not finish within the time budget (about 120 s for the whole call). Retry, or use profile quick.

    CLI

    Run audits from your terminal or any CI runner with Node 18+.

    export ONACCESSIBLE_API_TOKEN="oa_…"
    export ONACCESSIBLE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZ4a2Z3d2dmemFuZHV2c3pmbGl2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODEwNTE0OTUsImV4cCI6MjA5NjYyNzQ5NX0.bj6Q7gMGLXhWWK_CgUPa1MDxvvPMUjHhRVmiJQjSiCM"
    
    npx @onaccessible/cli audit https://example.com \
      --fail-on aa --max-critical 0 --require-full-engine
    
    # Mobile pass + authenticated scan (Premium API):
    npx @onaccessible/cli audit https://example.com --mobile-viewport
    npx @onaccessible/cli audit https://app.example.com --cookie-header "session=…"
    Automated status: Level A failures detected
    Coverage:         full real-browser checks
    Score:            69/100 (weighted axe A/AA rules, capped by the worst failure level)
    Issues:           30 failing A/AA elements (critical 4, serious 25, moderate 1, minor 0)
    Criteria:         A    5 failed · 5 to review · 14 manual · 17 of 31 have automated checks
                      AA   10 failed · 1 to review · 13 manual · 11 of 24 have automated checks
                      AAA  6 failed · 0 to review · 22 manual · 9 of 31 have automated checks
    Engine:           ON ACCESSIBLE 3.0.0 · axe-core 4.14.0 · driver cf-binding · profile full
    • --fail-on a|aa|aaa|none (default none): fail on automated failures at that level or below.
    • --min-score: minimum automated score; a limited scan with no score fails it.
    • --max-critical / --max-serious: failing A/AA elements by impact (unchanged).
    • --max-review: findings that need manual review.
    • --require-full-engine: exit 3 when the scan is limited.

    Install: npm install -g @onaccessible/cli. Exit codes: 0 all gates passed, 1 a gate failed or the API returned an error, 2 invalid usage, 3 limited scan with --require-full-engine.

    GitHub Action

    Add repository secrets ONACCESSIBLE_API_TOKEN and ONACCESSIBLE_ANON_KEY, then use the composite action from this repo:

    - uses: MTDTech/ONACCESSIBLE/.github/actions/accessibility-audit@main
      id: a11y
      with:
        url: https://example.com
        api-token: ${{ secrets.ONACCESSIBLE_API_TOKEN }}
        anon-key: ${{ secrets.ONACCESSIBLE_ANON_KEY }}
        fail-on: aa
        max-critical: "0"
        require-full-engine: "true"

    Inputs: min-score, max-critical, max-serious, max-review, fail-on, require-full-engine, ai, headless (legacy). Outputs: status (automatedStatus), level (status text), score (empty when the scan has no score), coverage and score-model. The step also writes a job summary.

    Webhooks

    Events: scan.completedscheduled.audit

    Signature header: X-OnAccessible-Signature: t=<unix>,v1=<hex> where v1 = HMAC-SHA256(secret, "t." + rawBody). Configure endpoints in the portal.

    Payload (snake_case): url, score (may be null), level (automated status, not a conformance level), summary, scanned_at, plus automated_status, score_model, engine_version, coverage, conformance_claim: false and criteria per level. scheduled.audit adds site_id and site_name.

    OpenAPI

    Machine-readable spec (version 2.0.0, includes the webhook payloads): /openapi/scan-api.yaml