[#27783] Add aria-invalid to fields with errors

Set aria-invalid attribute when field has error. Also included required attribute for required fields as bonus.