Skip to content

v3.0.0 - Selectable WCAG standards, reliable AI Fix, and safer audit workflows

Choose a tag to compare

@jakub-lipinski jakub-lipinski released this 05 Jul 00:05

This major release adds selectable WCAG 2.0, 2.1, and 2.2 standards, reusable interactive-state scripts in the CLI, URL-aware scan comparisons, more consistent local HTTPS handling, complete interface translations, and a safer optional AI Fix integration.

Added

  • Selectable WCAG standards in the dashboard:
    • WCAG 2.0
    • WCAG 2.1
    • WCAG 2.2
  • New CLI option for selecting the WCAG standard:
php artisan lens:audit --wcag=2.2
  • Cumulative axe-core rule selection for WCAG 2.1 and 2.2.
  • Selected WCAG version metadata in:
    • scan history
    • scan comparisons
    • baselines
    • PDF reports
  • Reusable interactive-state scripts in the CLI:
php artisan lens:audit https://app.test \
  --states=tests/accessibility/navigation.states
  • CLI state scripts support:
    • click
    • type
    • select
    • check
    • uncheck
    • wait
  • URL-aware history comparisons based on the normalized URL path and query.
  • Dedicated AccessibilityFixAgent for structured accessibility fixes.
  • Semantic AI source context based on the relevant element or component.
  • Minimal AI replacements instead of large rewritten source blocks.
  • One controlled retry for truncated or malformed structured AI responses.
  • Provider, resolved model, finish reason, and token usage diagnostics.
  • Immediate AI Fix applied — pending re-scan status after applying a suggestion.
  • Complete package-owned interface translations for:
    • English
    • Polish
    • Spanish
    • French
    • German
  • Localized history, comparisons, modals, charts, previews, PDF reports, recorder UI, and package-generated errors.
  • A subtle creator support link in the dashboard footer.

Changed

  • Core scanning now supports:
    • PHP 8.2+
    • Laravel 10, 11, 12, and 13
  • AI Fix is now an optional integration requiring:
    • PHP 8.3+
    • Laravel 12+
    • the optional laravel/ai package
  • laravel/ai is no longer required by the core package.
  • Applications without AI Fix support retain:
    • accessibility scanning
    • crawling
    • source mapping
    • scan history
    • comparisons
    • previews
    • PDF reports
    • interactive states
    • baselines
    • CLI audits
  • The dashboard now explains why AI Fix is unavailable and hides unsupported actions.
  • AI Fix uses the default model configured by laravel/ai. Lens does not expose or force a model.
  • AI generation now uses:
    • deterministic temperature
    • a 12000-token output ceiling
    • a reduced Gemini thinking budget
  • Applied AI suggestions remain in violation counts until a new axe-core scan verifies the result.
  • WCAG 2.0 remains the default for backward compatibility.
  • ignore_https_errors now behaves consistently across:
    • axe-core scans
    • interactive-state scans
    • sitemap and HTTP crawling
    • JavaScript-rendered browser crawling
    • element preview screenshots
  • Dashboard and PDF text now use shared translation catalogs.
  • Package metadata and documentation now describe the actual Lens library and v3 compatibility.

Fixed

  • Fixed scan comparisons treating the same rule and selector on different URLs as one issue.
  • Fixed comparison identity for issues appearing in different interactive states.
  • Fixed older asynchronous scan responses potentially replacing newer dashboard results.
  • Fixed AI Fix failures caused by truncated structured JSON responses.
  • Fixed oversized AI context that could exhaust provider token limits.
  • Fixed raw provider errors being displayed to dashboard users.
  • Fixed missing translations in history, comparisons, modals, charts, previews, PDF reports, and error responses.
  • Fixed local self-signed HTTPS handling in crawler and preview workflows.
  • Fixed the dashboard compatibility footer to include Laravel 13.

Security

  • AI Fix remains restricted to supported Blade, React, and Vue source paths.
  • AI Fix sends only:
    • accessibility issue metadata
    • the failing DOM snippet
    • WCAG tags
    • a bounded source element or component
  • AI Fix does not send the entire repository.
  • Submitted source fragments are not written to diagnostic logs.
  • Path traversal protection remains enforced.
  • Generated fixes containing dangerous execution functions remain blocked.
  • Unexpected PHP code introduced by generated fixes remains blocked.
  • AI availability is checked before AI routes or actions can be used.
  • External domain scanning remains blocked.
  • HTTP and HTTPS scheme validation remains enforced.
  • Ignoring HTTPS certificate errors remains opt-in and disabled by default.
  • Interaction scripts remain validated and limited before browser execution.

Upgrade Notes

Update Lens:

composer update webcrafts-studio/lens-for-laravel

Run migrations to add WCAG version metadata to existing scan history:

php artisan migrate

Existing history records default to WCAG 2.0.

If you previously published the config, add the new v3 options manually:

'wcag_version' => env('LENS_FOR_LARAVEL_WCAG_VERSION', '2.0'),

'ai_enabled' => env('LENS_FOR_LARAVEL_AI_ENABLED', true),

To enable AI Fix on PHP 8.3+ and Laravel 12+, install the optional SDK:

composer require laravel/ai:^0.3.2 --dev

AI Fix can be disabled without affecting the scanner:

LENS_FOR_LARAVEL_AI_ENABLED=false

To select a newer WCAG standard by default:

LENS_FOR_LARAVEL_WCAG_VERSION=2.2

Existing workflows continue to use WCAG 2.0 unless configuration, the dashboard, or --wcag selects another version.

When changing a baseline workflow from WCAG 2.0 to WCAG 2.1 or 2.2, create and review a fresh baseline because newer standards can legitimately detect additional violations.

Notes

axe-core automates many high-confidence accessibility checks, but neither axe-core nor Lens can determine full WCAG conformance.

Always complement automated scans with keyboard testing, screen reader testing, interaction-state testing, and manual review.