get_slug() ] = [ 'type' => 'checkbox', 'label' => esc_html__( 'Remove Title Attributes', 'accessibility-checker' ), 'labelledby' => 'accessible_name', // translators: %1$s: a attribute name wrapped in a tag. 'description' => sprintf( __( 'Remove %1$s attributes from elements that already have a preferred accessible name.', 'accessibility-checker' ), 'title' ), 'fix_slug' => $this->get_slug(), 'help_id' => 8494, ]; return $fields; } /** * Outputs the feature flag for the fix on the frontend for JS to use. * * @return void */ public function run() { if ( ! get_option( 'edac_fix_' . $this->get_slug(), false ) ) { return; } // Adds the accessible name data to be used in JS if necessary. add_filter( 'edac_filter_frontend_fixes_data', function ( $data ) { $data[ $this->get_slug() ] = [ 'enabled' => true, ]; return $data; } ); } }