| @@ -1175,9 +1175,9 @@ | ||
| 1175 | 1175 | errorHtml = `<div class="frm_error" ${ roleString } id="${ id }">${ jsErrors[ key ] }</div>`; |
| 1176 | 1176 | } |
| 1177 | 1177 | container.insertAdjacentHTML( 'beforeend', errorHtml ); |
| 1178 | 1178 | inputs.forEach( input => { |
| 1179 | - describedBy = input ? input.getAttribute( 'aria-describedby' ) : null; | |
| 1179 | + describedBy = input.getAttribute( 'aria-describedby' ); | |
| 1180 | 1180 | if ( ! describedBy ) { |
| 1181 | 1181 | describedBy = id; |
| 1182 | 1182 | } else if ( ! describedBy.includes( id ) && ! describedBy.includes( 'frm_error_field_' ) ) { |
| 1183 | 1183 | const { errorFirst } = input.dataset; |