array( Settings::class, 'sanitize' ), ) ); } /** * Enqueue admin stylesheet and scripts. * * @param string $hook Page hook. */ public static function assets( $hook ) { if ( 'settings_page_sarrloop-accessibility' !== $hook ) { return; } wp_enqueue_style( 'sarrloop-accessibility-admin', SARRLOOP_ACCESSIBILITY_URL . 'admin/css/admin.css', array(), SARRLOOP_ACCESSIBILITY_VERSION ); wp_enqueue_script( 'sarrloop-accessibility-admin', SARRLOOP_ACCESSIBILITY_URL . 'admin/js/admin.js', array(), SARRLOOP_ACCESSIBILITY_VERSION, true ); } /** * Render the admin settings page. */ public static function page() { if ( ! current_user_can( 'manage_options' ) ) { return; } $s = Settings::get(); $icons = Icons::get_picker_icons(); ?>

v

$icon_label ) : ?>

array( 'title' => __( 'Text size', 'sarrloop-accessibility' ), 'desc' => __( 'Allows visitors to increase, decrease, or reset body text size.', 'sarrloop-accessibility' ), 'icon' => 'text_size', ), 'contrast' => array( 'title' => __( 'High contrast', 'sarrloop-accessibility' ), 'desc' => __( 'High-contrast black background with high visibility text.', 'sarrloop-accessibility' ), 'icon' => 'contrast', ), 'grayscale' => array( 'title' => __( 'Grayscale', 'sarrloop-accessibility' ), 'desc' => __( 'Desaturates all website colors to grayscale.', 'sarrloop-accessibility' ), 'icon' => 'grayscale', ), 'highlight_links' => array( 'title' => __( 'Highlight links', 'sarrloop-accessibility' ), 'desc' => __( 'Underlines and highlights all hyperlinks.', 'sarrloop-accessibility' ), 'icon' => 'highlight_links', ), 'stop_animations' => array( 'title' => __( 'Stop animations', 'sarrloop-accessibility' ), 'desc' => __( 'Halts CSS animations, transitions, and smooth scrolling.', 'sarrloop-accessibility' ), 'icon' => 'stop_animations', ), 'large_cursor' => array( 'title' => __( 'Large cursor', 'sarrloop-accessibility' ), 'desc' => __( 'Switches to an enlarged high-contrast mouse cursor.', 'sarrloop-accessibility' ), 'icon' => 'large_cursor', ), 'readable_font' => array( 'title' => __( 'Readable font', 'sarrloop-accessibility' ), 'desc' => __( 'Applies clean, highly legible system sans-serif typography.', 'sarrloop-accessibility' ), 'icon' => 'readable_font', ), 'focus' => array( 'title' => __( 'Enhanced focus', 'sarrloop-accessibility' ), 'desc' => __( 'Shows prominent outline indicators on focused elements.', 'sarrloop-accessibility' ), 'icon' => 'focus', ), 'tts' => array( 'title' => __( 'Read aloud', 'sarrloop-accessibility' ), 'desc' => __( 'Uses the browser Speech Synthesis API to read content aloud.', 'sarrloop-accessibility' ), 'icon' => 'tts', ), 'keyboard' => array( 'title' => __( 'Keyboard navigation', 'sarrloop-accessibility' ), 'desc' => __( 'Highlights and aids navigation using keyboard tab stops.', 'sarrloop-accessibility' ), 'icon' => 'keyboard', ), ); foreach ( $features as $key => $feature ) : ?>