On initial request focus should be placed on username. This is because direct parent of focus component is not UIInput. In such situation focus is put on first UIInput in parent form. Please not that focus component is not direct child of form. This sample is to ensure you that UIInput is not searched within direct parent of focus component, but within nesting form.
On form submit, when username is valid and email is invalid, focus should be placed on email.
On form submit, when all fields are valid, focus should be placed on username.