Rewrite the layout and all Customers and Users pages with TallStackUI components and remove livewire/flux and its Boost skill. Fix the TallStackUI accessibility gaps found by the axe tests: - password reveal and theme switch have no accessible name: add <x-password-field> and keep the own theme toggle button - select.native label is not tied to the control: add aria-label - contrast: darker primary palette, soft-customized error colours and published alert/link colour classes; neutral buttons use subtle black - follow the system theme by default (localStorage key dark-theme) Load TallStackUI assets from the app URL so they work in the XAMPP subfolder, add Finnish TallStackUI strings, and drop inputmode=numeric from the business ID field so iOS keyboards show the hyphen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
60 lines
1.6 KiB
PHP
60 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use TallStackUi\Facades\TallStackUi;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->meetContrastRequirements();
|
|
}
|
|
|
|
/**
|
|
* TallStackUI uses red-500 for error text, which is 3.8:1 on white and
|
|
* below the 4.5:1 WCAG 2.2 AA requires. Darker red in light mode, lighter
|
|
* red in dark mode.
|
|
*/
|
|
private function meetContrastRequirements(): void
|
|
{
|
|
TallStackUi::customize()
|
|
->form('error')
|
|
->block('text')
|
|
->replace('text-red-500', 'text-red-700 dark:text-red-400');
|
|
|
|
TallStackUi::customize()
|
|
->form('label')
|
|
->block('error')
|
|
->replace(['text-red-600' => 'text-red-700', 'dark:text-red-500' => 'dark:text-red-400']);
|
|
|
|
TallStackUi::customize()
|
|
->form('label')
|
|
->block('asterisk')
|
|
->replace('text-red-500', 'text-red-700 dark:text-red-400');
|
|
|
|
// The typed value of a field in error is red-600: 3.8:1 on the dark input background.
|
|
TallStackUi::customize()
|
|
->form('input')
|
|
->block('error')
|
|
->replace('text-red-600!', 'text-red-700! dark:!text-red-400');
|
|
|
|
TallStackUi::customize()
|
|
->select('native')
|
|
->block('error')
|
|
->replace('text-red-600!', 'text-red-700! dark:!text-red-400');
|
|
}
|
|
}
|