定制 laraease/accessibility-wcag 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laraease/accessibility-wcag

最新稳定版本:v1.0.3

Composer 安装命令:

composer require laraease/accessibility-wcag

包简介

Complete WCAG Accessibility Widget for Laravel 10, 11, 12

README 文档

README

Latest Version License PHP Version Laravel Version

A comprehensive, WCAG-compliant accessibility widget for modern Laravel applications. This package provides a complete suite of tools to help make your website more accessible to all users, with a strong focus on WCAG 2.1 AA & AAA guidelines.

The widget is designed to be lightweight, performant, and fully customizable, offering a seamless integration into any Laravel project. It operates with an offline, cryptographically secure license validation system, ensuring privacy and performance without "calling home".

View Live Demo

Key Features

  • Dynamic Theming: Easily change the widget's primary color to match your site's branding.
  • Content Adjustments: Modify font size, line height, and letter spacing. Instantly highlight links and headings or disable flashing animations.
  • Color & Contrast: Apply high-contrast, monochrome, or inverted color schemes to improve readability.
  • Text-to-Speech (TTS): Advanced screen reader functionality with multiple reading modes (entire page, under cursor, live selection), adjustable speed, and real-time word or sentence highlighting.
  • Navigation Panels: Two dedicated panels for navigating the page's heading structure and all its internal/external links.
  • Cursor & Focus Aids: Includes a large cursor, a reading guide, and the ability to highlight paragraphs on hover. Adheres to WCAG 2.4.7 for highly visible focus indicators.
  • Form Assistance: A dedicated panel to highlight all required fields and an intelligent screen reader that announces input types, labels, and required status on focus.
  • Offline Licensing: Fast, secure, and private offline license validation. Your server never needs to contact ours.
  • Persistent Settings: User preferences are saved across sessions for a consistent experience.
  • Developer Friendly: Easy to install, configure, and integrate with a single Blade directive.

Requirements

  • PHP: ^8.1, ^8.2, or ^8.3
  • Laravel: ^10.0, ^11.0, or ^12.0

Installation

1. Require the Package via Composer

composer require laraease/accessibility-wcag

2. Add the Service Provider

The package uses auto-discovery, so you typically do not need to manually add the service provider. If you have disabled auto-discovery, add the provider to your config/app.php file:

'providers' => [
    // ...
    AccessibilityWCAG\AccessibilityServiceProvider::class,
],

3. Configure Your License Key

Add your license key to your .env file. This key is generated and signed for your specific domain upon purchase.

ACCESSIBILITY_WCAG_LICENSE_KEY=your-purchased-license-key

4. Add the Widget to Your Layout

Place the @accessibilityWCAG Blade directive in your main layout file (e.g., resources/views/layouts/app.blade.php) just before the closing </body> tag.

...
    @accessibilityWCAG
</body>
</html>

The widget will now automatically appear on all pages that use this layout.

Licensing

This is a commercial software package. You must purchase a license to use it in a production environment. The license is verified offline using a secure cryptographic signature tied to your domain, ensuring it is both fast and private.

Development on local domains (like .test, .local) is always permitted without a license key.

Click here to purchase your license from laraease.com

Configuration (Optional)

Although the package works out-of-the-box, you can publish and modify the configuration file for more granular control.

php artisan vendor:publish --provider="AccessibilityWCAG\AccessibilityServiceProvider" --tag="accessibility-config"

This will create a config/accessibility.php file where you can customize the widget's appearance, position, and enabled features.

Theming

You can easily change the widget's color scheme to match your website's branding. After publishing the configuration, open config/accessibility.php and modify the primary_color value.

The package will automatically generate all shades and ensure text remains legible on the new color.

// config/accessibility.php

'theming' => [
    'primary_color' => '#2563eb', // Change this to your brand's color
],

Language Support

The widget features intelligent language detection and provides numerous translations out-of-the-box.

Automatic Language Detection

The widget will automatically detect the language specified in your site's <html> tag (e.g., <html lang="fr">) and switch to the appropriate translation.

If a specific translation is not available, it will fall back to English. You can also force a specific language by setting the default_lang option in the configuration file.

Included Languages

The package provides built-in translations for the following languages:

  • DE German (de)
  • GB English (en)
  • ES Spanish (es)
  • FR French (fr)
  • IT Italian (it)
  • PL Polish (pl)
  • PT Portuguese (pt)
  • RO Romanian (ro)

Publishing Language Files

You can easily publish the language files to customize existing translations or add support for new languages. To publish the files, run the following Artisan command:

php artisan vendor:publish --provider="AccessibilityWCAG\AccessibilityServiceProvider" --tag="accessibility-lang"

This will copy the translation files to the resources/lang/vendor/accessibility-wcag/ directory in your application, where you can safely edit them.

Support

If you encounter any issues or have questions, please contact our support team.

Developed by SnapDesign.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: proprietary
  • 更新时间: 2025-12-28