PHP code example of parvion / accessibility

1. Go to this page and download the library: Download parvion/accessibility library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

parvion / accessibility example snippets


'colors' => [
    'primary'         => '#00205b',  // Header background, section labels
    'hover-primary'   => '#00143a',  // Hover state for primary elements
    'secondary'       => '#ff7402',  // Trigger button, active state, reset bar
    'hover-secondary' => '#e06600',  // Hover state for secondary elements
    'background'      => '#ffffff',  // Panel background
],

'theme' => 'default', // Options: 'default', 'dark', 'glass', 'minimal', 'neon', 'soft'

'position' => 'bottom-right', // Options: 'bottom-right', 'bottom-left', 'top-right', 'top-left'
// Set to false or 'inline' to render the button exactly where @accessibility is placed.

'store_settings' => true, // Save user preferences to localStorage across page reloads

'panel_layout' => 'right_drawer', // Options: 'right_drawer', 'left_drawer', 'bottom_sheet', 'center_modal'

'theme_switcher' => true, // Show theme selector UI inside the panel

'high_contrast' => [
    'enabled' => true,
    'shortcuts' => [
        'enabled'   => true,
        'modifiers' => ['alt'],   // 'ctrl', 'alt', 'shift', 'meta' — use an array for multiple
        'key'       => 'c',
    ],
],

'font_size' => [
    'enabled' => true,
    'shortcuts' => [
        'enabled'   => true,
        'modifiers' => ['alt'],
        'keys' => [
            'up'   => ']',   // Alt+] increases font
            'down' => '[',   // Alt+[ decreases font
        ],
    ],
],

'skip_to_content' => [
    'enabled' => true,
    'shortcuts' => ['enabled' => false],
],

'global_shortcuts' => [
    'toggle_panel' => [
        'enabled'   => true,
        'modifiers' => ['alt'],
        'key'       => 'a',    // Alt+A — open / close the panel
    ],
    'reset_settings' => [
        'enabled'   => true,
        'modifiers' => ['alt'],
        'key'       => '0',    // Alt+0 — reset all settings
    ],
],

'read_page'      => ['enabled' => true, 'shortcuts' => ['enabled' => true, 'modifiers' => ['alt'], 'key' => 'r']],
'read_selected'  => ['enabled' => true, 'shortcuts' => ['enabled' => true, 'modifiers' => ['alt'], 'key' => 'x']],
'hover_speech'   => ['enabled' => true, 'shortcuts' => ['enabled' => true, 'modifiers' => ['alt'], 'key' => 'w']],
'stop_reading'   => ['enabled' => true, 'shortcuts' => ['enabled' => true, 'modifiers' => ['alt'], 'key' => 'z']],
'voice_selector' => ['enabled' => true, 'shortcuts' => ['enabled' => true, 'modifiers' => ['alt'], 'key' => 'v']],
'voice_languages' => ['en'],  // Filter voices by language. Empty array [] shows all voices.
bash
php artisan vendor:publish --tag=accessibility-config