[whatwg] Web Forms 2.0 - Comments on sections 1 and 2

I read the Web Forms 2.0 doc sections 1 and 2, and I have some comments:

---------------

Input precision attribute
=========================
I think this should also apply to the 'time' type (and perhaps others).
It would basically be nice to be able to say 'whole hours only'. UA's
could also offer easier controls for such a more limited precision. I am
sure many authors of pages wanting to offer a choice of whole hours (or
be it half hours) will trade it in for a select control otherwise.

(for that matter, isn't 'expdate' just a date with lower precision?)


'range' type
============
Well, what about... er... 'analog'... 'slider'... *thinks hard* no,
that's about all I can come up with.


The pattern attribute
=====================
The problem is obviously that title serves a clear purpose right now and
is fairly unrestrictive; I think using title for this would make people
(unconsciously) 'abuse' it, because they do perhaps not realize there
are special 'restrictions' tied to its use here. I don't think title
fits using it in an error message very well (unless all major UA's will
actually display it in the error message -you say 'may', after all-, but
then there's also such a thing as context which could differ).

OTOH, it *is* really the proper attribute to provide extra information
in typically a tooltip. IMHO, title is ok. It will probably be abused,
but the most popular UA's actually using it in their error messages (as
opposed to some not using it) should help, and writing good title
attribute texts need a manual anyway.

I also think that maybe you should leave adding the 'The expected format
is:' string to the page author (inside the title element). This would
remove all context problems among browsers using different phrasing for
that, and don't forget there is also a language factor to keep in mind.
"Het verwachte formaat: A digit followed by three uppercase letters."
when using the Dutch translation of my favorite browser does look a bit
weird. Also, take a look at this string... In high school (or maybe it
was basic school) I learned that after a : colon you shouldn't start
with a capital.

On the other hand, a "The expected format: ???????" (Japanese
speakers, forgive me any mistakes) error from a fictional form on
auctions.yahoo.co.jp would be easier for me to figure out with my
fragile knowledge of Japanese than in case I had to try and translate
the preceding text as well. So maybe you should not. OTOH (again),
there's always the warning "The text you have entered does not match the
required pattern." before the actual title so that should be enough. And
one can take a peek at the regular expression itself... ah... details.
Anyways, point being, languages should be something to consider.

Maybe get it out of the error message entirely, and use something
automated which translates the regular expression to plain English? ;p


required attribute applies to all controls except radio buttons
===============================================================
What about radio buttons in sets where none of the buttons are marked as
checked? I really think this should apply to those as well.


autofocus... true???
====================
I think it's weird that you are specifically recommending to use <input
autofocus="true">, while you there is no such remark at <input required>
(or <input required="required"> for xhtml). For that matter, <input
autocomplete="off"> is also not very consistent. These are all booleans.
I think they should therefore also 'work' the same. I can understand
this not the case for autocomplete because of legacy support, but the
other two...

Of course there is no real difference for the browser. I mean, I could
also type required="yes" if I wanted, it would 'set' the property as
well. Also, autofocus="false" does NOT un-set it (which using 'true'
implies). Basically, I'd just say recommend using 'autofocus' in HTML
and 'autofocus="autofocus"' in XHTML, and not this weird true stuff. Or
throw it all around (I am not in favour of that), and use 'true'/'false'
and/or 'yes'/'no', but then also apply that scheme to required, etc.

By the way, it says "The following must not cause the autofocus
attribute to be set: <input autofocus>"... Why not? That is exactly how
other booleans such as checked and required work in HTML, and (unless
I'm totally wrong about this) they appear to the HTML processor as if it
were XML with 'attribute="attribute"', right? That's why XHTML needs you
to write attributes without value like that.

In any case, this is totally inconsistent. Er. Do something about it :).


The help attribute
==================
I clearly see a use for this in combination with CSS3 attribute
selectors, :hover, :after and generated content (kay twould be a bit of
a complex selector, but heh :) those are the fun ones). Also, I see no
reference whatsoever to a supposed 'hint' attribute on form controls in
HTML 4.01. Maybe I am blind, but it probably just isn't there, so the
note doesn't really make sense. Finally, "to show that it would be
trivial to add to HTML as well" doesn't really express a very good
reason to add the attribute. If that were the only reason, to show off,
then it might as well not be there.


Error handling
==============
"Authors must not do this. User agent implementors may curse authors who
violate these rules, and may persecute them to the full extent allowed
by applicable international law."

This made me laugh :). Keep it up guys ^_^.

---------------

Well, that's about it. Maybe more comments later on all the templates
and repeating stuff, it kind of scares me right now though ;p. Plus,
it's late.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!

Received on Sunday, 6 June 2004 16:08:05 UTC