webcrafts-studio / lens-for-laravel
A local-first WCAG accessibility auditor for Laravel with axe-core, source mapping, CI workflows, and optional AI fixes.
Package info
github.com/webcrafts-studio/lens-for-laravel
pkg:composer/webcrafts-studio/lens-for-laravel
Requires
- php: ^8.2
- illuminate/routing: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- spatie/browsershot: ^4.0|^5.0
Requires (Dev)
- laravel/boost: ^2.2
- laravel/mcp: >=0.5.3 <0.10|^1.0
- laravel/pint: ^1.27
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
Suggests
- laravel/ai: Required only for AI Fix on PHP 8.3+ and Laravel 12/13. Supports SDK >=0.3.2 <0.12 or ^1.0; Composer selects compatible dependencies. Core scanning does not require it.
- laravel/mcp: Required only for Lens MCP. Supports SDK >=0.5.3 <0.10 or ^1.0; Composer selects a compatible version for Laravel 10.49+, 11, 12, or 13. Core scanning does not require it.
Provides
None
Conflicts
- laravel/ai: <0.3.2|>=0.12.0 <1.0.0|>=2.0.0
- laravel/mcp: <0.5.3|>=0.10.0 <1.0.0|>=2.0.0
Replaces
None
README
Accessibility, closer to your code.
Documentation ·
Website ·
Report an issue
About Lens
Lens for Laravel finds accessibility issues in your rendered application, maps them to source files, and helps you review fixes in the dashboard. Powered by axe-core and Chromium.
- Scan your app: individual pages, whole websites, interactive states, and pages behind login.
- Find the source: Blade, Livewire, React, Vue, and Inertia projects.
- Review AI fixes: editable suggestions, diff previews, cloud providers, and local Ollama models.
- Track progress: scan history, comparisons, element previews, PDF reports, and CI baselines.
See an element preview
Quick start
Requires PHP 8.2+, Laravel 10-13, Node.js, and Chromium. Use Lens in local or controlled development environments.
composer require webcrafts-studio/lens-for-laravel --dev npm install puppeteer --save-dev php artisan lens:install
Open /lens-for-laravel/dashboard in your application, or run:
php artisan lens:audit --aa --wcag=2.2
WCAG 2.0 is the default; --wcag=2.2 includes the earlier rule sets. See the installation guide for optional history and configuration.
AI Fix is optional: PHP 8.3+, Laravel 12+, and laravel/ai are required. Set up AI Fix
AI requests send bounded source context to the configured provider. Default localhost Ollama processing stays on the application host; cloud providers and remote Ollama endpoints receive that context over the network. Applied fixes remain pending and counted until a fresh scan verifies them.
Use Lens with your coding assistant
Connect Codex or Claude Code to the same Lens scanner through the optional official laravel/mcp package. Ask your assistant to scan a page, inspect findings, edit the source, and verify the changes with a fresh audit.
composer require laravel/mcp --dev php artisan lens:mcp:install --client=codex
Use --client=claude for Claude Code, then reconnect your assistant. It starts the local MCP server automatically. Lens MCP requires PHP 8.2+ and Laravel 10.49+; it uses your assistant's model and does not require laravel/ai.
Documentation
Scanning modes · Configuration · CLI & CI · AI Fix · Lens MCP
Upgrade guides: v3 · v2.1 · v2.
Automated checks do not prove full WCAG conformance. Always complement scans with manual keyboard and screen reader testing. Source mapping is heuristic.
Lens for Laravel is open source under the MIT license.