Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

In Drupal 8 delete buttons switched to links instead of submit buttons.
Main reasons for this switch:

  1. In most cases those submit buttons were just triggering a redirection to a confirm form.
  2. Because of the fact that they were submit buttons the form validation (server-side and client-side) was being triggered, which didn't make sense.

D7

function myform($form, &$form_state) {
  $form = array();
  // ...
  // The rest of form declaration.
  // ...
  $form['actions']['delete'] = array(
    '#type' => 'submit',
    '#value' => t('Delete'),
    '#submit' => array('myform_delete_submit'),
  );

  return $form;
}

function myform_delete_submit($form, &$form_state) {
  $form_state['redirect'] = 'my/path/delete';
}

D8

use Drupal\Core\Form\FormBase;
class MyForm extends FormBase {
  public function buildForm(array $form, array &$form_state) {
    $form = array();
    // ...
    // The rest of form declaration.
    // ...
    $form['actions']['delete'] = array(
      '#type' => 'link',
      '#title' => $this->t('Delete'),
      '#attributes' => array(
        'class' => array('button', 'button--danger'),
      ),
      '#route_name' => 'my.delete_route',
    );

    return parent::buildForm($form, $form_state);
  }
}
Impacts: 
Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done