[whatwg] Constraint validation feedback (various threads)

Mounir Lamouri mounir.lamouri at gmail.com
Sun Feb 13 14:42:48 PST 2011


On 02/11/2011 11:23 PM, Ian Hickson wrote:
> 
> Following up on the e-mail I just sent, which was on the same topic (I 
> missed that there was more to the thread when replying to that one):
> 
> On Wed, 24 Nov 2010, Mounir Lamouri wrote:
>>
>> After Firefox 4, we would like to introduce a new flag that will let us 
>> know if the element's value has been changed by the user (probably if 
>> the _last_ change has been done by the user). The meaning of this flag 
>> would be to fix the retro-compatibility issues. Then, an element would 
>> suffer from being too long if this flag is true and it's value length is 
>> greater than the maxlength attribute value. In addition, users will be 
>> able to enter text longer than the maxlength attribute for textarea (and 
>> maybe input) elements. That way, we would be able to fix 
>> retro-compatibility issues and provide a better experience to the users.
> 
> Why would you want to make it possible to enter long values? If there's a 
> use case for it, I'm happy to address it, but if there isn't it's not 
> clear that we should change this aspect of browser behaviour, since it's 
> been pretty widely implemented for a long time.

This proposition is mostly trying to fix a user experience issue: when
you have to type a text limited to a given number of characters and at
some point you just can't type anymore because you reached this limit,
it's really frustrating because you have to constantly remove some text,
type until you reach the limit, remove some text again...
It seems much more interesting to use the constraint validation
mechanism we already have to tell the user that the text is actually
limited to X characters. With that system, the user will be able to type
it's entire text and then easily reduce it to the desired size.
Think about how annoying twitter.com would be if the users were not able
to type when the text field has reached 140 characters.

Though, this might not be really helpful for text field which aren't
expecting a long text. If this is an issue, maybe we could go for
Aryeh's suggestion for <input> [1] and do that one for <textarea> only?
But it might be confusing.

[1] UA shouldn't allow the the text length to be greater than the
maxlength value (and assume that the element can't suffer from being too
long).

--
Mounir


More information about the whatwg mailing list