[Bug 13769] WF3: Add trim="" attribute to <textarea>, <input type=text/search>, <form>, and <fieldset> (applying to all contained fields of appropriate types) that strips leading and trailing whitespace from the value

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13769

--- Comment #33 from Mounir Lamouri <mounir.lamouri@gmail.com> 2011-10-12 00:54:40 UTC ---
I agree that trim on textarea would very likely goes wrong.(In reply to comment
#30)
> Regarding textarea, I fear people would use it inappropriately, so it would be
> a problem. For example, one could imagine this very textarea I'm using right
> now being marked trim="", since most of the time that makes sense. But if I had
> started this comment with some indented code, it would break the first line's
> indentation.
> 
> I could see an argument for trimming just leading and trailing newlines, rather
> than newlines and spaces; what do you think?

I don't think it would be a good idea to have <input trim> doing X and
<textarea trim> doing Y. I would prefer to not have trim on textarea given that
it's not really clear what that should do.

> For the fieldset case, do you have an example of a Web page that groups
> controls in this way? I don't want to add it to fieldset unless it's clear that
> authors really are using fieldset in this way, otherwise it's just bloat.

I agree with this. I don't see why fieldset should have a trim attribute that
would add the trim functionality to all descendants. We only do that for
disabled (and the use case here is pretty obvious). If we do it for trim, why
not for other attributes like required? Adding attributes applying to all
fieldset descendants isn't common.

Though, I think this also apply to form element. Why do we want to add trim to
the form element? Do we have obvious use cases? How many elements in a form
would usually require the trim attribute? Only text field seem to have a real
need of it.

I think we should probably begin by adding trim to input element (and make it
apply only to some types) and forget the other elements for the moment. Nothing
forbids us to add trim to other elements later if the need is more obvious.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 12 October 2011 00:54:54 UTC