It's not possible to set aria-invalid attribute on the input field which would be great when to set when the validation is changing state in the phoneObject.
My suggestion would be to handle this internally in the component itself, when the state changes between true / false of phoneObject.valid. Or handle it as a property.
It's not possible to set
aria-invalid
attribute on the input field which would be great when to set when the validation is changing state in the phoneObject.https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid
My suggestion would be to handle this internally in the component itself, when the state changes between
true
/false
ofphoneObject.valid
. Or handle it as a property.