Closed jaredcunha closed 7 years ago
Sorry -- to be clear, the demo app doesn't advance in IE9?
Yeah, IE9 doesn't support checkValidity
which I'm using for validation. Hence the bugging out.
Hmmmm. seems like there's a decent chance there are people who will be using IE9, and it's a thing we generally support. Is it a lot of work to fix? Maybe something @raquelromano can poke around with?
@raquelromano just tinkering around and i think i got this!
Guess we duplicated some work here. I went ahead and committed my changes though (same effect, just pulled into a single function in session-storage.js)
Oh. Now that I see where certain values are assumed to be defined in the JavaScript, IE9 users may still encounter errors when validation is skipped.
Back to what Jared says above about whether or not it's worth fixing since we will do this completely differently in the rails app.
But one terrible hack for the moment is to find all the places where a form field is required to be defined and have it default to some value if the user doesn't supply it. I'm not sure that's any better though.
@raquelromano, ha, sorry about that! I didn't see that you self-assigned until I already pushed the work up. It was a quick fix.
Is worth making a note that validations are only supported in modern browsers in the demo only?
To your last point, was that in reference to the demo or error handling altogether?
This has been addressed yea?
@mollieru - We've resolved the issue in terms of getting the demo form to advance in IE9.
The demo uses HTML5 browser validation, which unfortunately does not work in IE9. So it possible to advance the form, and errors or missing fields could have an impact downfield.
How we approach validation in a functioning application is worthy of another discussion, in perhaps a separate issue. My approach would be layered as follows:
checkValidity
. However, I think in doing that, while it's possible to support IE9 and below on the client side, you lose any benefits of browsers improving their native implementation. Of course, the approach I've outlined will not resolve the issue of validation of IE9 in the demo, but it would resolve the issue of validation IE9 in the actual application. I'm open to other ideas, but thems my two cents.
Yep, we'll do both client- and server-side validaiton in the web application and use a polyfill on the client: https://www.html5rocks.com/en/tutorials/forms/constraintvalidation/#toc-polyfilling
We could do that here as well for anyone browsing the demo on those other browsers since there are still issues if fields are left blank. I'd say it's a nice to have for this demo.
Ah yeah - shims!
Will be resolved in https://github.com/usds/benefits-enrollment-prototype/issues/58
This isn't an error that will have any impact on the rails site, but it would impact testing on IE9. We can circumvent this by requiring testers to use a modern browser. Just not sure if it's worth putting effort into this point.
cc @mollieru