An invalid form control with name='photo-1' is not focusable. code example
Example 1: an invalid form control with name='' is not focusable
add novalidate in your form
Example:
<form action="" novalidate>
</form>
Example 2: An invalid form control with name='' is not focusable.
if(document.getElementById('hidden_field_choice_selector_parent_element'.value==true){
document.getElementById('hidden_field').removeAttribute("required");
}