focusFirstElement
focusFirstElement(formElement) -> HTMLFormElement
Gives keyboard focus to the first element of the form.
Uses Form.findFirstElement()
to get the first element and calls activate()
on it. This is useful for enhancing usability on your site by bringing focus on page load to forms such as search forms or contact forms where a user is ready to start typing right away.