'checkbox', 'label' => esc_html__( 'Force Link Underline', 'accessibility-checker' ), 'labelledby' => 'force_link_underline', 'description' => esc_html__( 'Ensure that non-navigation links are underlined.', 'accessibility-checker' ), 'fix_slug' => $this->get_slug(), 'help_id' => 8489, ]; return $fields; } /** * Executes the tabindex removal fix on the frontend. * * @return void */ public function run() { if ( ! get_option( 'edac_fix_force_link_underline', false ) ) { return; } // Adds the tabindex removal data to be used in JS if necessary. add_filter( 'edac_filter_frontend_fixes_data', function ( $data ) { /** * Filters the target element selector for forcing underlines. * * This filter allows customization of the target elements that should have * forced underlines applied. By default, the selector is set to 'a'. * * @since 1.16.0 * * @hook edac_fix_underline_target * * @param string $el The target element selector. Default is 'a'. * * @return string Modified target element selector. */ $target = apply_filters( 'edac_fix_underline_target', 'a' ); $data['underline'] = [ 'enabled' => true, 'target' => $target, ]; return $data; } ); } }