How to install the accessibility widget in Laravel
This guide walks you through the installation process of the package and configuration of the WCAG accessibility widget in your Laravel application.
Step 1: Package installation
In a Laravel environment, the recommended way to install packages is using Composer.
Step 2: Website registration and token generation
To allow the widget to connect to the service, you need to generate a unique API token.
If you are installing the plugin for the first time, register (opens in a new tab) using Google, Facebook or use your own email address and password.
After creating an account, go to the “My Sites” tab, and then click the button “Add new” (opens in a new tab).
In the form for adding a new page, enter the addresses of the websites where you want to apply the token. If your site runs on a domain such as example .com and e.g. www. example.com then it is necessary to add both addresses. Read more about this in the documentation (opens in a new tab).
Finally, click the "Save" button and copy the generated token.
Step 3: Token configuration
After generating your token, add it to your Laravel environment configuration file.
Step 4: Adding the widget to your application
The package provides a Blade directive that allows you to easily embed the widget anywhere in your application.
Step 5: Clear configuration cache
After making changes, it is recommended to clear Laravel’s cache:
Step 6: Preview your website
After completing the setup, open your website and verify that the accessibility widget is loaded correctly.
Test accessibility features such as:
Alternative: Manual installation (without the package)
If you cannot use the Composer package, you can manually integrate the widget into your Laravel application.
Once completed, the WCAG accessibility widget will be active in your Laravel application.
Related posts
- How to install the accessibility widget in Joomla
- Accessibility widget script
- How to install the accessibility widget in MODX
- How to install the accessibility widget in Prestashop
- How to install the accessibility widget in WordPress
Still looking for answers?
Ask our experts using online chat