by Someone1234 · 6y ago · 0 comments
What century are Mozilla living in? Most, even simple forms, don't use <form> elements and submit buttons anymore, they're all aJax. Therefore this workaround will be commonly bypassed.
People can debate if this is a good or bad thing, but ultimately the problem remains: This change will cause unexpected behavior when maxlength-ed stuff no longer obeys on thousands of popular websites.
Even if sites check it server-side, that doesn't mean the user experience isn't substantially degraded relative to obeying HTML standards.
Their justification for this change is nonsensical too:
> This change mainly aims at preventing an unexpectedly truncated password from being saved.
So why not limit it to input type=password? Heck why include textareas in this change, who is using a textarea for a password box?!
> No putting them in a form also breaks accessibility
Nope. Screen readers have no concept of <form> fields, nor any concept of how the piping works below the surface when a <button> is pressed. I run a screen reader every single day.
If the change really does get bypassed by everyone, that only underlines the sad state of modern website design relying completely on javascript.
I'm not sure why they don't limit this to just passwords but I can imagine it's easier to change the behaviour for all form elements than it is to change the behaviour of just password fields.
You don't even need to use "the proper form validation API". It's as simple as changing your ajax call from an onclick (on the submit button) to an onsubmit (on the form).
I do consider using the HTML5 form validation to be the proper validation API. Browser can do a lot without javascript and relying on their default behaviour is still making use of the validation API.
https://dev.to/addyosmani/accessibility-tips-for-web-develop...
If you have an article that does explain your argument, please link it.
> Also at least for me its a lot better to use the built in form validation then creating your own.
This change removes that very validation.
How? The form can't be submitted until it's fixed.
>The form cannot be submitted until the user fixes the error [...]. The user will typically see a red border around the text field along with a validation message [...]
Even for this site, why is Mozilla not limiting this breaking change designed to fix password fields to: Password fields. They haven't described why type=text or even textarea should be non-standard, only why type=password should be.
If they limited this to password fields, I'd have no issue. But per the code change they did not.
> This change will cause unexpected behavior when maxlength-ed stuff no longer obeys on thousands of popular websites.
Does nobody or "thousands of popular websites" use <form>? Which one is it?