[Bug 12561] Add the @action in the <form> so that there is a way to submit to the same page

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

--- Comment #19 from Luke Plant <L.Plant.98@cantab.net> 2011-06-21 22:14:49 UTC ---
To add some stats to my last message, I set up a crawler to do a broad search
on as many domains as possible, with these results:

On 6192 URLs, across 4303 domains, containing 10520 forms, it found:

233 pages with 'base'     ( 3.8%)
containing 672 forms, of which:
- 25 had action=""      ( 3.7%)
- 0  had action=" "     ( 0.0%)

5959 pages with no 'base' (96.2%)
containing 9848 forms, of which
- 386 had action=""     ( 3.9%)
- 0   had action=" "    ( 0.0%)

So, we're seeing about 4% of forms having action="" or action=" ", whether
there is 'base' or not. (My own experience is that having action="" is actually
much more common - it is the normal case for most forms I write, because you
very often want to validate and display any errors on the same form as was
submitted).

For all of these pages, with the current HTML5 spec the author would have a
problem to fix if they wanted to move to HTML5, or would have confusion caused
by the current decision to disallow the empty URL, despite it being a perfectly
valid relative URL according to RFC 1808.

In a much smaller set of cases - the 0.2% of all forms that have 'base' and
also have either action="" or action=" " (25/10520), the new spec could
*potentially* save some confusion. I say potentially, because they might not
actually have any problem, and if they did it would only help if they run their
page through a checker. If they do run it through a checker, however, a
warning, as suggested above, would be just as useful as an error.

In addition to the confusion and problems caused for both new and existing
documents, there are worse problems for tool authors, and I don't think that
Ian Hixie's comment took this into account:

Many tools produce HTML that targets either HTML4 and HTML5 doctypes, or XHTML
1.0 and HTML5 doctypes. It is entirely possible to do this successfully in many
cases. For example, currently the 'admin' application of the Django web
framework generates HTML which is entirely compatible with both XHTML and HTML5
- with the one exception of *this* change to @action. With the change, it is
impossible to satisfy both XHTML and HTML5 (or HTML4 and HTML5), as pointed out
by Julian Reschke above.

Since we *cannot* fix this in Django (in any feasible way), our only option is
to ignore validity, with the result that validity checking will increasingly
become irrelevant since pages will very often have errors. This, of course,
works in the direction of defeating the whole purpose of this change.

Thanks for taking the time to read this.

-- 
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 Tuesday, 21 June 2011 22:14:57 UTC