- How do I install this package in a Laravel project using ArtisanPack UI?
- Run `composer require artisanpack-ui/accessibility` and publish the config with `php artisan vendor:publish --tag=artisanpack-package-config`. Ensure your `config/artisanpack/accessibility.php` is properly merged with your existing settings. The package requires ArtisanPack v2+ and Laravel 8+.
- What Laravel versions does this package support?
- This package officially supports Laravel 8 and above. Laravel 7.x is not supported due to dependencies on ArtisanPack’s newer features like typed properties and service provider hooks. Upgrade your Laravel version first if needed.
- Can I use this package without ArtisanPack UI?
- No, this package is tightly coupled with ArtisanPack UI. Standalone projects would need to fork the package or adopt ArtisanPack to avoid migration overhead. The config structure and namespace (`artisanpack.accessibility.*`) are designed for ArtisanPack’s ecosystem.
- How do I migrate from the old `accessibility.*` config to the new `artisanpack.accessibility.*` namespace?
- Update all config references in your codebase (e.g., `config('accessibility.*')` to `config('artisanpack.accessibility.*')`). Move any custom `config/accessibility.php` to `config/artisanpack/accessibility.php` and republish the config. Use `php artisan config:clear` afterward to flush cached configs.
- Does this package include keyboard navigation helpers for Laravel Blade components?
- Yes, the package provides utilities for keyboard navigation, focus states, and ARIA labels out of the box. It integrates with ArtisanPack UI components to ensure seamless keyboard accessibility, including skip links, modal traps, and dynamic focus management.
- How do I test accessibility features in my Laravel app?
- Use tools like axe-core, WAVE, or browser dev tools to validate ARIA attributes and keyboard interactions. The package includes helper methods to inspect focus states and screen reader announcements. For automated testing, integrate PHPUnit with accessibility testing libraries like `php-accessibility`.
- What if my custom `accessibility.php` config conflicts with the new merge logic?
- The package uses `mergeConfiguration()` to handle conflicts, prioritizing your custom values over defaults. If issues arise, manually validate your `config/artisanpack/accessibility.php` for overrides. Test edge cases like partial array merges to ensure no unexpected behavior.
- Are there performance concerns with this package in production?
- The package is optimized for minimal runtime overhead. It primarily adds helper methods and config-driven utilities, which are lazy-loaded where possible. Monitor your app’s performance post-integration, but expect negligible impact unless you’re using heavy custom accessibility logic.
- What alternatives exist for Laravel accessibility if I don’t want to use ArtisanPack?
- Alternatives include standalone packages like `spatie/laravel-accessibility` or `laravel-accessibility/accessibility`, which offer similar features without ArtisanPack dependencies. However, they may lack the tight integration with UI components that this package provides.
- How do I contribute or report issues with this package?
- Report issues or feature requests on the [GitHub repository](https://github.com/ArtisanPack-UI/accessibility). Follow the contribution guidelines, including running tests and ensuring compatibility with ArtisanPack’s latest version. The maintainers actively review PRs for accessibility improvements.