Download the PHP package artisanpack-ui/accessibility without Composer

On this page you can find all versions of the php package artisanpack-ui/accessibility. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package accessibility

ArtisanPack UI Accessibility

A PHP package for ensuring web applications meet accessibility standards, particularly for color contrast.

Features

Installation

You can install the package via Composer:

For detailed installation instructions, including Laravel integration, see the Getting Started Guide.

Usage

Here is a practical, real-world example of how to use the package to create an accessible button component in Laravel.

Creating an Accessible Button Component

1. Create a new Blade component:

2. Modify the component class:

In app/View/Components/Button.php, we'll accept a background color and automatically determine the correct text color.

3. Update the component view:

In resources/views/components/button.blade.php, we'll apply the colors as inline styles.

4. Use the component in your views:

Now you can easily create accessible buttons with any background color.

For more detailed examples, including Livewire components and dynamic theming, see the Real-World Examples documentation.

Hooks

This package ships with three filter hooks (via artisanpack-ui/hooks) that let applications customize the color-contrast pipeline without patching the package:

Hook Type Payload Purpose
ap.accessibility.contrastThreshold filter (float $ratio, string $context) Override the default WCAG threshold. Context is one of aa, aa-large, aaa, aaa-large, non-text.
ap.accessibility.contrastColorMap filter (array $map) Register custom Tailwind-name → hex mappings or replace the map entirely.
ap.accessibility.textColorGenerated filter (string $color, string $background, bool $tinted) Take a final say on the generated text color. Useful for per-background overrides.

AI features

When artisanpack-ui/ai v1.0+ is installed alongside this package, three AI-powered accessibility agents become available. Each is toggle-able through the shared FeatureRegistry and no-ops when the toggle is off.

Feature key Agent Purpose
a11y.content_analysis ContentAccessibilityAgent Finds content-level issues (ambiguous link text, vague headings, undefined jargon) that static rules miss.
a11y.aria_suggestion AriaSuggestionAgent Suggests ARIA roles, states, and properties for custom components from their markup and behavior.
a11y.contrast_explanation ColorContrastExplanationAgent Explains contrast failures in plain language and proposes alternatives that preserve brand intent.

Trigger surfaces ship in-package for all three frontends so extending framework support does not require any changes to @artisanpack-ui/react or @artisanpack-ui/vue:

The React and Vue components POST to /api/v1/a11y/ai/{content-analysis,aria-suggestion,contrast-explanation} by default; pass an endpoint prop to override.

The shipped endpoints sit behind auth:sanctum and throttle:api, so a stateful SPA needs Laravel Sanctum's SPA setup: SANCTUM_STATEFUL_DOMAINS configured for the frontend origin, a prior GET to /sanctum/csrf-cookie to seed the XSRF-TOKEN cookie, and same-origin requests. The bundled React and Vue triggers automatically read that cookie and send X-XSRF-TOKEN + X-Requested-With: XMLHttpRequest, so no per-caller header wiring is needed once the SPA is authenticated.

Documentation

For complete documentation, please visit the links below.

Requirements

The PHP floor moved to 8.3 in 2.2.0 to match the artisanpack-ui/ai foundation dependency. Laravel 11 support was dropped in the same release. Users staying on PHP 8.2 or Laravel 11 should pin to ^2.1.2.

Contributing

As an open source project, this package is open to contributions from anyone. Please read through the contributing guidelines to learn more about how you can contribute to this project.

License

This package is open-sourced software licensed under the GPL-3.0-or-later license.


All versions of accessibility with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
artisanpack-ui/ai Version ^1.0
artisanpack-ui/core Version ^1.0
artisanpack-ui/hooks Version ^1.3
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package artisanpack-ui/accessibility contains the following files

Loading the files please wait ...