[whatwg] Usability issues with input type=url validation
mikey.clarke at me.com
Wed Oct 17 16:59:02 PDT 2012
I'd like a little information on the motivation for using absolute URLs on <input type="url"> validation.
Currently <input type="url"> is to be validated using absolute URLs. Thus, 'http://www.mysite.com' validates but 'www.mysite.com' does not. I consider this to be a huge usability issue. An ordinary user when asked to provide a URL will be very unlikely to provide the protocol. To an ordinary user 'www.mysite.com' is the URL, not 'http://www.mysite.com'.
Since most browsers that support both the new input types and that have fully implemented form validation block submission of a form with invalid inputs, a user entering 'www.mysite.com' is unable to submit their form and is instead given an error. Even assuming that the error notice is descriptive enough to alert to the absence of the required protocol (this is currently _not_ the case), the user has already been disrupted. Such strict validation is hostile and potentially confusing to users. As a developer I currently feel compelled to use the 'novalidate' attribute on forms containing type=url to protect my users from this behaviour.
I feel that if a developer requires the protocol, they are perfectly capable of asking the user for it, and doing so in a much clearer way than the browser itself. If the validation for URL fields is to remain so strict, I really see little point in this input type being validated at all; as a developer there is absolutely no way I can use this validation as it stands, the potential for a poor user experience is just too evident.
More information about the whatwg