[whatwg] RFC: <input type="username">
Steve Dennis
admin at subcide.com
Wed May 5 13:39:35 PDT 2010
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
More information about the whatwg
mailing list