An invalid form control with name='consent_name' is not focusable. code example
Example 1: an invalid form control with name='' is not focusable
add novalidate in your form
Example:
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");
}