-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[D8] Form API: Natively support the HTML5 required and aria-required properties #5346
Comments
I've created a starting point with backdrop/backdrop#3817 but we also need to:
|
There is: Apparently, we also need #5348. |
I'm just catching up on this family of issues. In Drupal 8+ this created an accessibility regression which still hasn't been fixed https://www.drupal.org/project/drupal/issues/1797438. The accessibility team recommended first using Javascript for client-side validation and using the HTML5 validation as a fallback. So makes me wonder if this is required for inline form errors or not (especially if inline form errors could be displayed from server-side too). |
Yes @herbdool, I have mentioned that in my previous-to-last comment here. I thought that it might be wise to wait for the outcome of https://www.drupal.org/project/drupal/issues/1797438 before implementing a matching solution for us (no point to be mimicking what was done in Drupal if that is proven to cause a regression). Apparently, we also needed #5348, which was only recently committed to Backdrop (in 1.23.0 back in September). BTW, I'm seeing some pretty recent activity in that d.org issue (now slated for D10). Perhaps we don't need to wait for the specific implementation to be committed to Drupal, since there's already a technical direction in that issue (as well as input/feedback from the Drupal accessibility team). |
...let me start by rebasing the PR, and let's take it from there. |
Oh boy 😓 ...that d.org issue is now more than a decade old, and in the end the decision has been made to disable HTML5 form validation globally, since it is not accessible and not a good fit for Drupal to begin with. That is a bold move, and those are big words, I know, I'll try to summarize discussions in the issue summary here, but having read through the most recent comments in that thread (5 and 3 years ago to now), I have to say that things make sense and that I agree. Having said that, I will point out @quicksketch's comment in that issue from back in 2012 (emphasis mine):
Not sure if you stand by that comment still @quicksketch and not sure if things are going to improve suddenly for browsers and screens readers, if a decade has not been enough time. Anyway, I have rebased the PR, and have pushed that change, and disabling the HTML5 form validation in |
This is basically the same issue as https://www.drupal.org/project/drupal/issues/1174938 (which is set to be backported to D7 in https://www.drupal.org/project/drupal/issues/2984256).
The text was updated successfully, but these errors were encountered: