My powermail forms fields already have aria-describedby attributes and they get overwritten by powermail form validation.
Since html elements can be aria-descridedby multiple elements, can I suggest adding to the current aria-describedby instead of using setAttribute and removeAttribute on line 442 and 465 of FormValidation.js ?
Using something like :
function addAttributeValue(element, attributeName, valueToAdd) {
const currentValue = element.getAttribute(attributeName) || '';
const valuesArray = currentValue.split(' ').filter(Boolean); // Split and filter empty strings
if (!valuesArray.includes(valueToAdd)) {
valuesArray.push(valueToAdd);
}
element.setAttribute(attributeName, valuesArray.join(' '));
and
function removeAttributeValue(element, attributeName, valueToRemove) {
const currentValue = element.getAttribute(attributeName) || '';
const valuesArray = currentValue.split(' ').filter(Boolean); // Split and filter empty strings
const updatedValuesArray = valuesArray.filter(value => value !== valueToRemove);
element.setAttribute(attributeName, updatedValuesArray.join(' '));
}