Search by

webcrafts-studio / lens-for-laravel

jakub-lipinski

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

Homepage

Documentation

pkg:composer/webcrafts-studio/lens-for-laravel

Statistics

Installs: 9 620

Dependents: 0

Suggesters: 0

Stars: 57

Open Issues: 0

v3.6.0 2026-10-28 00:12 UTC

This package is auto-updated.

Last update: 2026-11-01 16:20:56 UTC


README

Lens for Laravel

Latest stable version Total downloads GitHub stars MIT license

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.
A real WCAG 2.2 audit of an example Laravel checkout: three findings and their Blade source locations.
See an element preview Lens highlights an unlabelled email field on the scanned checkout page.

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.

Setup, tools, and long scans.

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.