Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297975

Inconsistent user interface with focusing fields

$
0
0

The URL http://www.example.com/user/login will display a page, where the email address is focused. However http://www.example.com/user/register does not focus the email field.

/core/modules/user/src/AccountForm.php

Proposed change. Change:

'email','#title' => $this->t('Email address'),'#description' => $this->t('A valid email address. All emails from the system will be sent to this address. The email address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by email.'),'#required' => !(!$account->getEmail() && $user->hasPermission('administer users')),'#default_value' => (!$register ? $account->getEmail() : ''),
);

to:

'email','#title' => $this->t('Email address'),'#description' => $this->t('A valid email address. All emails from the system will be sent to this address. The email address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by email.'),'#required' => !(!$account->getEmail() && $user->hasPermission('administer users')),'#default_value' => (!$register ? $account->getEmail() : ''),'#attributes' => array('autofocus' => 'autofocus'
  ),
);

Notice the autofocus attribute.


Viewing all articles
Browse latest Browse all 297975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>