Closed sword3d closed 1 week ago
This is indeed new behaviour in Formie 3 due to our revised client-side validation.
The goal here is to provide proper feedback when errors are rectified. So when you submit the form initially, the error is flagged (no email provided, or not a valid email), and in Formie 2, after changing the field value, the error message didn't update until after you submitted it again. In Formie 3, we wanted to update that as you modify the field and fix your error as you type. This is a very popular and prevalent UX pattern.
So you're right in that after submission (and an error occurs) the validator turns into a "live" validator.
Having said that, the aria attributes shouldn't change their identifier on type. Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.14"
.
But I did want to confirm the actual issue here. Is the issue that the aria-describedby
reference is changing, or that fact that it's being removed and re-applied as you type? If it's the latter, that's a little unavoidable as the live nature of validation is that it's going to remove the error on-type. If it's the former issue, that's fixed in the above dev branch.
Fixed in 3.0.0-beta.15
Describe the bug
When we submit a form with an error, Typing validation are triggered after submitting it, causing aria-describedby attribute to update instantly on typing. Because of this, we get accessibility issues for voice over. I don't see such problem for the Formie 2.x version.
Steps to reproduce
Form settings
Craft CMS version
5.1.8
Plugin version
3.0.0-beta.14
Multi-site?
yes
Additional context
https://github.com/verbb/formie/assets/4801308/233cff1e-ca0a-44da-9c1e-60150c4ba807