W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] select element should have a required attribute

From: Richard Bywater <rbywater@gmail.com>
Date: Wed, 11 Aug 2010 21:59:55 +1200
Message-ID: <AANLkTi=nVv_kKPvM6b_9h1EDnqP_SB4qthQeVZMkca-x@mail.gmail.com>
On Wed, Aug 11, 2010 at 9:31 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> On Wed, Aug 11, 2010 at 2:03 AM, Mikko Rantalainen
> <mikko.rantalainen at peda.net> wrote:
>> Stuff I don't want to see (combined with @required):
>> - first option is always special
>> - empty string as the value is special
>> - option without a value is special
> Do you consider it a problem for <input type=text required> to treat
> empty string special?
> If yes, do you think @required should be removed completely?
> If no, why do you consider it a problem for <select>?

I've been following this thread for only a short time but I too cannot
see why one would not have @required on a <select> element. It appears
to me that having a blank-value <option> within a <select> is a
mechanism used by various websites where you are trying to prompt the
user to select a value from the list.

Personally I see <input> and <select> elements being very much aligned
as they are both form elements - therefore I would have thought that
if behaviour was being added to <input> then a similar behaviour
(where applicable) should be added to <select> elements.

Just my 2 cents...
Received on Wednesday, 11 August 2010 02:59:55 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:26 UTC