'checkbox', 'label' => esc_html__( 'Remove Tab Index', 'accessibility-checker' ), 'labelledby' => 'remove_tabindex', // translators: %1$s: a attribute name wrapped in a tag. 'description' => sprintf( __( 'Remove the %1$s attribute from focusable elements.', 'accessibility-checker' ), 'tabindex' ), 'fix_slug' => $this->get_slug(), 'group_name' => $this->get_nicename(), 'help_id' => 8496, ]; return $fields; } /** * Executes the tabindex removal fix on the frontend. * * @return void */ public function run() { if ( ! get_option( 'edac_fix_remove_tabindex', false ) ) { return; } // Adds the tabindex removal data to be used in JS if necessary. add_filter( 'edac_filter_frontend_fixes_data', function ( $data ) { $data['tabindex'] = [ 'enabled' => true, ]; return $data; } ); } }