ArtisanPack UI Accessibility: Building Inclusive PHP & Laravel Apps with Confidence

A close-up view of a person's hands using an electronic assistive device labeled "SENSE," featuring a refreshable Braille display and white input keys. A standard black computer keyboard is partially visible in the background.

Accessibility isn’t a nice-to-have; it’s a crucial requirement for any website, application, or package.

It’s something I’ve discussed extensively before.

But I don’t just talk the talk. I also walk the walk.

Take the ArtisanPack UI Accessibility package for example. The package was initially built to check simple color contrast and to display black or white text based on the specified background color. It’s now a package with a suite of tools that helps developers create accessible websites and apps, both within and outside the Laravel ecosystem.

Let’s dive into how and why I built the package, and how it can help developers.

The Initial Plan for the Package

Initially, the package was created as a Digital Shopfront CMS package, before I pivoted to migrate it to ArtisanPack UI.

The primary goal was to add PHP functionality to check color contrast and return black or white text based on the background color. I also added support for configuring the duration of a toast element.

That was essentially it for version 1.0. I wanted to include more, but that felt like a good place to stop briefly and launch the package; however, I had to come back and republish it as an ArtisanPack UI package.

At the same time, it was my first Composer package I uploaded to Packagist, so it was perfectly fine as a small package.

Focusing on Adding More Features

After a while, and after getting the ArtisanPack UI flywheel, I wanted to add more versatility to the package.

It did basic color accessibility well, but for a package called accessibility, I feel it should have done more.

As I became more comfortable with AI programming, I decided to have Junie audit the plugin to identify areas for improvement and what needed to be added to make it a truly accessible package.

The result was roughly 20 feature issues, ranging from adding real-world examples to supporting more color formats for contrast checking to adding customization support and more.

Now it was time to get to work making those feature ideas a reality.

Development of Version 2.0

To be honest, I used AI to help significantly with version 2.0 of the package.

Between my 9-5 job at the university and creating additional packages and a Digital Shopfront CMS, I needed a tool to speed up development for 2.0. Plus, when you specifically direct it to make things accessible, it does a good job, though, as always, you need to double-check it.

I took this task step by step: first, I asked the AI agent I was using (switching among Junie, Gemini, and Claude) to generate a detailed plan as a Markdown document for me to review and refine before approving it for implementation, as agreed.

The result was delivering a substantial version 2.0 feature set within a couple of weeks.

How it Can Help Developers

In addition to the color and toast features I mentioned, I built for phase one, the package provides developers with a range of accessibility tools to help them create accessible apps and packages.

Color remains the primary focus, and developers can check color contrast using hex, RGB, HSL, or even Tailwind colors. Several configuration settings can adjust the levels checked, particularly WCAG AA and AAA 2.1 and 2.2.

It also works both inside and outside Laravel applications, making it highly versatile across all PHP projects.

The documentation is detailed, with real-world examples that show how to create accessible apps with the package.

I hope to continue developing it into a must-have package for all Laravel apps.

The Future of the Accessibility Package

Right now, I feel the package is feature-complete mainly. It already has many tools to help developers.

Additionally, I have other tasks I need to work on, though I will still patch bugs as they appear.

I expect to start adding more non-color-related accessibility checks, such as alt text, heading levels, forms, and more, eventually.

I might add new items I discover while working on other packages and products.

But it feels like a solid package that can help developers make their apps and packages more accessible to everyone.

Leave a Reply

Your email address will not be published. Required fields are marked *