Change record status: 
Project: 
Introduced in branch: 
11.x
Introduced in version: 
11.x
Description: 

The confirm_password element has been deprecated, and a new element named password_unmask, element class core/lib/Drupal/Core/Render/Element/PasswordUnmask.php has been introduced to enhance the user experience for password fields.

The password_unmask element allows users to reveal their password and also customize the inclusion of show password strength indicator.
The new element includes the ability to toggle password visibility.The attribute 'data-drupal-strength-indicator' allows the user to include the strength indicator by setting it to TRUE which is by default set to FALSE.

Code usage

 * $form['pass'] = array(
 *   '#type' => 'password_unmask',
 *   '#title' => t('Password'),
 *   '#size' => 25,
 * );

Old

New

AttachmentSize
New behaviour58.67 KB
Old behaviour64.29 KB