| @@ -1146,15 +1146,10 @@ | ||
| 1146 | 1146 | } |
| 1147 | 1147 | |
| 1148 | 1148 | input.attr( 'aria-describedby', describedBy ); |
| 1149 | 1149 | } |
| 1150 | + input.attr( 'aria-invalid', true ); | |
| 1150 | 1151 | |
| 1151 | - if ( [ 'radio', 'checkbox' ].includes( input.attr( 'type' ) ) ) { | |
| 1152 | - input.closest( '[role="radiogroup"], [role="group"]' ).attr( 'aria-invalid', true ); | |
| 1153 | - } else { | |
| 1154 | - input.attr( 'aria-invalid', true ); | |
| 1155 | - } | |
| 1156 | - | |
| 1157 | 1152 | jQuery( document ).trigger( 'frmAddFieldError', [ $fieldCont, key, jsErrors ] ); |
| 1158 | 1153 | } |
| 1159 | 1154 | } |
| 1160 | 1155 | |
| @@ -1190,15 +1185,10 @@ | ||
| 1190 | 1185 | if ( fieldContainer && fieldContainer.classList ) { |
| 1191 | 1186 | fieldContainer.classList.remove( 'frm_blank_field', 'has-error' ); |
| 1192 | 1187 | } |
| 1193 | 1188 | |
| 1194 | - if ( 'true' === input.attr( 'aria-invalid' ) ) { | |
| 1195 | - input.attr( 'aria-invalid', false ); | |
| 1196 | - } else if ( [ 'radio', 'checkbox' ].includes( input.attr( 'type' ) ) ) { | |
| 1197 | - input.closest( '[role="radiogroup"], [role="group"]' ).attr( 'aria-invalid', false ); | |
| 1198 | - } | |
| 1199 | - | |
| 1200 | 1189 | errorMessage.remove(); |
| 1190 | + input.attr( 'aria-invalid', false ); | |
| 1201 | 1191 | input.removeAttr( 'aria-describedby' ); |
| 1202 | 1192 | |
| 1203 | 1193 | if ( typeof describedBy !== 'undefined' ) { |
| 1204 | 1194 | describedBy = describedBy.replace( errorId, '' ); |