- From: Schalk Neethling <schalk@ossreleasefeed.com>
- Date: Wed, 5 May 2010 23:06:47 +0200
The way I see it is that instead of browsers traversing the DOM looking for an input field of either id=username or name=username or even class=username, they now only have to look for an input of type username. Makes it a lot easier for both developers and browser vendors as they now only have to look for an input of type username and gives developers the freedom to use any name, id or class. Kind Regards, Schalk -----Original Message----- From: whatwg-bounces@lists.whatwg.org [mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Steve Dennis Sent: Wednesday, May 05, 2010 10:40 PM To: Christoph P?per Cc: WHATWG List Subject: Re: [whatwg] RFC: <input type="username"> On 5/05/2010, at 9:09 PM, Christoph P?per wrote: > Eitan Adler: >> >> A type="username" is added to the input element. type="username" would MUST only be used for the name that is used to log in to the site. It MUST NOT be used for registration forms or anything else that requires a username. A form MAY have up to one (but not more) type="username" input field. > > I agree with whomever mentioned that > > <form role=login> > > seems more appropriate. Anyhow, I wondered whether it makes sense to apply microformats to such forms, perhaps reusing ?hcard?: > > <form class=vcard role=login method=post action="./"> > <input type=text name=username class=nickname> > <input type=password name=password> > <input type=submit> > </form> > > Nick and user name are probably not the same all that often and differ by site, so this probably doesn?t make sense at all. Still, form field semantics (?name?/?id? and ?class? or ?role?) may improve through some kind of standardization, although names shouldn?t be as clumsy as in RFC 3106 (ECML: Field Specifications for E-Commerce) when applied to HTML forms. > > <form action="http://ecom.example.com" method=post class=Ecom> > <fieldset class=Payment-Card> > <legend>Please enter card information</legend> > <label class=Name>Your name on the card > <input type=text name="Ecom_Payment_Card_Name" size=40> > </label> > <label class=Number>The card number > <input type=text name="Ecom_Payment_Card_Number" size=19> > </label> > <label class=ExpDate>Expiration date (MM YY) > <input type=month class=Month name="Ecom_Payment_Card_ExpDate_Month" size=2> > <input type=year class=Year name="Ecom_Payment_Card_ExpDate_Year" size=4> > </label> > <input type=hidden class=Protocol > name="Ecom_Payment_Card_Protocol"> > </fieldset> > <input type=hidden class=SchemaVersion name="Ecom_SchemaVersion" > value="http://www.ecml.org/version/1.1"> > <input type=submit> <input type=reset> </form> I don't know if it's relevant, but if we're thinking backwards compatibility, keep in mind earlier versions of ASP.NET only allow one form per page, so wrapping a login in a form tag isn't really an option. Someone tell me if I'm wrong on that though, I'm just a designer :) -- Steve Dennis www.subcide.com=
Received on Wednesday, 5 May 2010 14:06:47 UTC