[whatwg] select element should have a required attribute

Eitan Adler lists at eitanadler.com
Fri Jun 18 10:03:14 PDT 2010


On Fri, Jun 18, 2010 at 12:58 PM, Gordon P. Hemsley <gphemsley at gmail.com>wrote:

> I'm not sure how you interpreted, but I wanted to clarify, in case it
> wasn't clear.
>
> I'm pretty sure this person is asking why @required isn't allowed on
> <select> elements.
>
> As in:
> http://dev.w3.org/html5/markup/forms-attributes.html#shared-form.attrs.required
>


>
> I don't know what the exact reasoning is for it not being on there, nor do
> I know exactly how @required is supposed to be enforced, but I do think that
> the method suggested in the bug is a bad one. Sometimes, authors will
> include an empty <option> on purpose in order to allow for an empty option
> to be selected.
>

Perhaps the @requires attribute could be handled somewhat differently. If
present the "default" value becomes the "not allowed" value and the browser
would require you to change the value before submitting the form.

-- 
Eitan Adler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100618/bc8f2da4/attachment-0002.htm>


More information about the whatwg mailing list