This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
As per the specification below, it appears that <input type='url' /> fields will not support the special form URL localhost, I believe this to be an oversight as in many cases when querying the user for a url, especially in the case of most post-form applications of this input type, localhost is a perfectly valid response. In example, a user is instructed to enter the information of a database to connect to, usually the response will be in the form of schema://<ipv4 addr> or localhost, however, occasionally it will take the form of a url [very likely one the user agent has encountered before]. Forcing this application to use the type='text' field will under-utilize the information the user-agent may be able to supply to the user. As an aside, thank you for your time in reviewing this. I am quite excited about the new introductions into the html standard this offers as it may help move web development away from reliance on obscure or arcane classes/ids. 4.10.7.1.4 URL state The value attribute, if specified, must have a value that is a valid URL potentially surrounded by spaces that is also an absolute URL 2.6 URLs A URL is an absolute URL if resolving it results in the same output regardless of what it is resolved relative to, and that output is not a failure. An absolute URL is a hierarchical URL if, when resolved and then parsed, there is a character immediately after the <scheme> component and it is a U+002F SOLIDUS character (/). An absolute URL is an authority-based URL if, when resolved and then parsed, there are two characters immediately after the <scheme> component and they are both U+002F SOLIDUS characters (//). To parse a URL url into its component parts, the user agent must use the parse an address algorithm defined by the IRI specification. [RFC3987]
Maybe I'm missing something but "localhost" is not a valid url, right? "http://localhost" would be (as would "ssh://localhost" which means something totally different).
http://localhost is a valid URL for <input type=url> per the spec as far as I can tell. Why do you think otherwise?
Valid points, closing.
mass-moved component to LC1