← 返回
未分类 Key 中文

accesslint

Web accessibility & WCAG compliance scanner — detects WCAG 2.1 violations, missing ARIA attributes, color contrast issues, keyboard navigation problems, and...
网页无障碍与WCAG合规扫描器 — 检测WCAG 2.1违规、缺失的ARIA属性、颜色对比度问题、键盘导航问题等
suhteevah
未分类 clawhub v1.0.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 397
下载
💾 0
安装
1
版本
#latest

概述

AccessLint — Web Accessibility & WCAG Compliance Scanner

AccessLint scans codebases for WCAG 2.1 violations, missing ARIA attributes, color contrast issues, keyboard navigation problems, form accessibility failures, and semantic HTML anti-patterns. It uses regex-based pattern matching against 95+ accessibility patterns across HTML, JSX, Vue, and Svelte templates. Lefthook integration for git hooks, markdown accessibility reports with WCAG success criterion mapping.

Commands

Free Tier (No license required)

accesslint scan [file|directory]

One-shot accessibility scan of files or directories.

How to execute:

bash "<SKILL_DIR>/scripts/accesslint.sh" scan [target]

What it does:

  1. Accepts a file path or directory (defaults to current directory)
  2. Auto-detects file type from extensions (HTML, JSX, TSX, Vue, Svelte)
  3. Finds all template/component files that contain markup
  4. Runs 95+ accessibility patterns against each file
  5. Calculates an accessibility score (0-100) per file and overall
  6. Outputs findings with: file, line number, check ID, severity, WCAG criterion, description, recommendation
  7. Exit code 0 if passing (score >= 70), exit code 1 if issues found
  8. Free tier limited to 5 files per scan

Example usage scenarios:

  • "Scan my code for accessibility issues" -> runs accesslint scan .
  • "Check this component for WCAG violations" -> runs accesslint scan src/components/Button.tsx
  • "Audit my templates for missing ARIA attributes" -> runs accesslint scan src/
  • "Are there any accessibility problems in my frontend?" -> runs accesslint scan .

Pro Tier ($19/user/month -- requires ACCESSLINT_LICENSE_KEY)

accesslint hooks install

Install git pre-commit hooks that scan staged files for accessibility issues before every commit.

How to execute:

bash "<SKILL_DIR>/scripts/accesslint.sh" hooks install

What it does:

  1. Validates Pro+ license
  2. Copies lefthook config to project root
  3. Installs lefthook pre-commit hook
  4. On every commit: scans all staged template files for accessibility violations, blocks commit if critical/high findings, shows remediation advice

accesslint hooks uninstall

Remove AccessLint git hooks.

bash "<SKILL_DIR>/scripts/accesslint.sh" hooks uninstall

accesslint report [directory]

Generate a markdown accessibility report with findings, severity breakdown, and WCAG criterion mapping.

bash "<SKILL_DIR>/scripts/accesslint.sh" report [directory]

What it does:

  1. Validates Pro+ license
  2. Runs full scan of the directory
  3. Generates a formatted markdown report from template
  4. Includes per-file breakdowns, accessibility scores, WCAG 2.1 success criterion references
  5. Output suitable for accessibility reviews and compliance audits

accesslint audit [directory]

Deep accessibility audit with component analysis and ARIA coverage checks.

bash "<SKILL_DIR>/scripts/accesslint.sh" audit [directory]

What it does:

  1. Validates Pro+ license
  2. Runs all 95+ patterns including framework-specific and dynamic content patterns
  3. Analyzes component-level accessibility coverage
  4. Reports ARIA attribute completeness across the codebase
  5. Provides heading hierarchy and landmark region analysis

Team Tier ($39/user/month -- requires ACCESSLINT_LICENSE_KEY with team tier)

accesslint policy [directory]

Enforce organization-specific accessibility policies on codebases.

bash "<SKILL_DIR>/scripts/accesslint.sh" policy [directory]

What it does:

  1. Validates Team+ license
  2. Loads custom policies from ~/.openclaw/openclaw.json (accesslint.config.customPolicies)
  3. Enforces organization-specific rules (e.g., required ARIA patterns, banned inaccessible patterns, mandatory alt text)
  4. Combines custom policies with built-in patterns for comprehensive scanning
  5. Outputs SARIF-compatible results

accesslint sarif [directory]

Generate SARIF JSON output for CI/CD integration.

bash "<SKILL_DIR>/scripts/accesslint.sh" sarif [directory]

What it does:

  1. Validates Team+ license
  2. Runs full scan of the directory
  3. Outputs findings in SARIF 2.1.0 JSON format
  4. Compatible with GitHub Code Scanning, Azure DevOps, and other SARIF consumers

accesslint wcag [directory]

Generate WCAG 2.1 AA/AAA compliance report.

bash "<SKILL_DIR>/scripts/accesslint.sh" wcag [directory]

What it does:

  1. Validates Team+ license
  2. Runs full scan with all patterns
  3. Maps findings to WCAG 2.1 success criteria (Level A, AA, AAA)
  4. Generates comprehensive compliance report with pass/fail per criterion
  5. Includes executive summary, detailed findings, and remediation roadmap

accesslint status

Show license and configuration information.

bash "<SKILL_DIR>/scripts/accesslint.sh" status

Detected Violations

AccessLint detects 95+ accessibility patterns across 6 categories:

| Category | Examples | Severity |

|----------|----------|----------|

| Missing ARIA & Roles | Images without alt, buttons without accessible names, inputs without labels, icon-only buttons without aria-label, SVG without title/role, links with no text content | Critical/High |

| Semantic HTML Issues | div/span used as button/link, nested interactive elements, heading hierarchy violations, multiple h1 tags, missing lang attribute, missing document title | Critical/High |

| Keyboard Navigation | Click handlers without keyboard equivalent, mouseOnly events, missing focus styles, tabindex misuse, focus traps without escape | High/Medium |

| Form Accessibility | Inputs without associated labels, missing fieldset/legend, placeholder-only labels, required fields without aria-required, error messages not linked | Critical/High |

| Color & Visual | Color-only information, potential low contrast patterns, missing prefers-reduced-motion, animations without motion preference | High/Medium |

| Dynamic Content | Live regions without aria-live, loading states without announcements, modals without focus management, toast/notification without role=alert | High/Medium |

Configuration

Users can configure AccessLint in ~/.openclaw/openclaw.json:

{
  "skills": {
    "entries": {
      "accesslint": {
        "enabled": true,
        "apiKey": "YOUR_LICENSE_KEY_HERE",
        "config": {
          "severityThreshold": "high",
          "customPolicies": [],
          "excludePatterns": ["**/test/**", "**/examples/**", "**/storybook/**"],
          "wcagLevel": "AA",
          "reportFormat": "markdown"
        }
      }
    }
  }
}

Important Notes

  • Free tier works immediately with no configuration
  • All scanning happens locally -- no code is sent to external servers
  • License validation is offline -- no phone-home or network calls
  • Pattern matching only -- no AST parsing, no external dependencies
  • Supports scanning multiple template formats in a single pass
  • Git hooks use lefthook which must be installed (see install metadata above)
  • Exit codes: 0 = passing (score >= 70), 1 = issues found (for CI/CD integration)
  • Addresses WCAG 2.1 Level A, AA, and AAA success criteria

Error Handling

  • If lefthook is not installed and user tries hooks install, prompt to install it
  • If license key is invalid or expired, show clear message with link to https://accesslint.pages.dev/renew
  • If a file is binary, skip it automatically with no warning
  • If no scannable files found in target, report clean scan with info message
  • If file type cannot be determined from extension, skip the file gracefully

When to Use AccessLint

The user might say things like:

  • "Scan my code for accessibility issues"
  • "Check for WCAG violations in my frontend"
  • "Are there any missing ARIA attributes in my components?"
  • "Audit my templates for accessibility problems"
  • "Check if my forms have proper labels"
  • "Scan for keyboard navigation issues"
  • "Check my React components for a11y issues"
  • "Generate an accessibility report"
  • "Set up pre-commit hooks for accessibility"
  • "Check for missing alt text on images"
  • "Are there any heading hierarchy problems?"
  • "Scan for color contrast issues"
  • "Run WCAG compliance checks on my templates"

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-07 11:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

DepGuard

suhteevah
使用原生包管理器审计扫描项目依赖的漏洞和许可证合规性,并生成安全或合规报告。
★ 0 📥 1,166

authaudit

suhteevah
认证与授权模式分析器——检测缺失的认证检查、不安全的会话管理、失效的访问控制、CSRF 漏洞以及令牌处理漏洞
★ 0 📥 396
developer-tools

DocSync

suhteevah
通过 git hooks 自动生成并同步文档;使用 tree‑sitter 解析和语义 diff 在本地检测并修复文档漂移。
★ 0 📥 1,289