aw-front-helpers 2.5.6 → 2.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/classes/formControl.js +4 -0
- package/package.json +1 -1
package/classes/formControl.js
CHANGED
|
@@ -180,6 +180,7 @@ export default class FormControl {
|
|
|
180
180
|
error.classList.remove(this._options.classIsError);
|
|
181
181
|
error.parentNode.removeChild(error);
|
|
182
182
|
});
|
|
183
|
+
el.removeAttribute('aria-describedby');
|
|
183
184
|
} else {
|
|
184
185
|
const isErrors = [...this._form.querySelectorAll(`${this._options.classIsError}`)];
|
|
185
186
|
const currentErrors = [...this._form.querySelectorAll(`.${this._options.classErrorElement}`)];
|
|
@@ -189,6 +190,9 @@ export default class FormControl {
|
|
|
189
190
|
isErrors.forEach(error => {
|
|
190
191
|
error.classList.remove(this._options.classIsError);
|
|
191
192
|
});
|
|
193
|
+
this._domForm.els.forEach( input => {
|
|
194
|
+
input.removeAttribute('aria-describedby');
|
|
195
|
+
});
|
|
192
196
|
}
|
|
193
197
|
}
|
|
194
198
|
|