[whatwg] Element-related feedback
ian at hixie.ch
Fri Jul 23 11:54:54 PDT 2010
On Tue, 16 Mar 2010, Philip Jägenstedt wrote:
> On Tue, 16 Mar 2010 17:01:00 +0800, Ian Hickson <ian at hixie.ch> wrote:
> > On Mon, 16 Nov 2009, Philip Jägenstedt wrote:
> > >
> > > http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#the-time-element-0
> > >
> > > "When the time binding applies to a time element, the element is
> > > expected to render as if it contained text conveying the date (if
> > > known), time (if known), and time-zone offset (if known) represented
> > > by the element, in the fashion most convenient for the user."
> > >
> > > This is very vague. Anything which tries to localize the date/time
> > > will fail because guessing the language of web pages is hard.
> > > Hard-coding it to English also wouldn't be very nice. What seems to
> > > make the most sense is using the "best representation of the global
> > > date and time string" and equivalents for just time and date that
> > > have to be defined. Still, I'm not sure this is very useful, as the
> > > same rendering (but slightly more flexible) could be accomplished by
> > > simply putting the date/time in the content instead of in the
> > > attribute. As a bonus, that would degrade gracefully. Unless I'm
> > > missing something, I suggest dropping the special rendering
> > > requirements for <time> completely.
> > The idea is to render the date or time in the user's locale, not the
> > page's, though I agree that in some cases that could be confusing.
> > Maybe we should leave the localising behaviour to author CSS and not
> > do it automatically by default?
> I think that would be better, yes. Either that or a spec saying exactly
> what string to output for each possible locale. (Making it platform- and
> browser-dependent is just asking for trouble.)
I haven't changed this at this point because it would leave the element as
rendering nothing when the contents of the element are empty and the
author has only provided an attribute.
Most platforms have built-in mechanisms for showing dates and times in a
fashion of the user's chosing. I suggest using that. It may be that this
ends up being a lost cause, or that authors don't care about this, but I
think we should at least give it a shot. I'm reluctant to have an element
that does nothing visual and is just used for encoding data, since that is
likely to end up with a lot more bogus data than if it actually does
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg