This recipe will detail how keyboard focus can be assigned to the username field in the login block. This will ensure that the user does not need to use the mouse or tab through the page to log in to the site.
We will be using the mysite module created earlier in this book to hold our odds and ends. It is assumed that this module has been created and is enabled.
The following steps are to be performed inside the mysite module folder at
userfocus.jsand open it in an editor.