[whatwg] Text areas with pattern attributes?

On Mon, Aug 31, 2009 at 12:04 AM, Ian Hickson<ian at hixie.ch> wrote:
> On Sun, 30 Aug 2009, Jonas Sicking wrote:
>>
>> Ok, addresses might not be the best example. I would imagine that most
>> use cases for pattern for a single line, carries over if you want to
>> have that single line wrap and be displayed as multiple lines. So if you
>> can provide the list of use cases that was used to add pattern on
>> single-line input and I'd be very surprised if not most of them carries
>> over to multi-line.
>
> The main use cases that were considered as far as I recall were credit
> card numbers and other bank numbers (we originally considered type=cc but
> that turned out to be more locale-specific than expected), social security
> numbers and other formatted serial numbers, and username fields that
> exclude certain characters.

So add 'multiple' on all of those and you'll have a good reason you'd
want them all to be able to wrap over multiple lines. I.e. ability to
enter multiple bank numbers, multiple social security numbers or
multiple usernames.

>> The difference between <input type=text> and <textarea> is mostly a
>> rendering one. One scrolls the text when it can't fit, the other wraps.
>> Do you really think that creates enough of a difference that the feature
>> set should be different?
>
> The feature sets are different in many other ways. This is hardly an
> exception. For example, <textarea> has no list="" support, cols="" works
> differently than size="", the default value is set differently, <textarea>
> doesn't support autocomplete, etc.

All of these seem like a bad idea to keep separate for multiline
inputs vs. single line inputs. Except for the default value which for
historic reasons make sense to use separate mechanisms, and cols/size
which are both mostly rendering differences.

/ Jonas

Received on Sunday, 30 August 2009 21:47:21 UTC