[uf-discuss] Formatting arbitrary dates, not part of hCalendar
Scott Reynen
scott at randomchaos.com
Fri Mar 9 07:58:35 PST 2007
On Mar 9, 2007, at 9:10 AM, Ara Pehlivanian wrote:
> I've always had trouble with the idea of using <abbr> to mark up dates
> because semantically, it isn't expressing an abbreviation of any sort.
I think the confusion here is that we're actually using
"abbreviation" more semantically than literally. That is, it's not
the character count that's abbreviated; it's the meaning.
(I didn't find this in a FAQ anywhere, but it comes up often enough
that I think it should be added. I'd be happy to add my own
explanation if it makes sense, but I'm sure I've seen others offer
better explanations.)
> It's simply a different form of the same date.
What we're wrapping in <abbr> is not simply different; it's less
meaningful to machines. If it weren't, we'd have no need for
<abbr>. And can publish something like that with no <abbr>, e.g.:
<span class="dtstart">2007-03-09</span>
But if you want to communicate the full meaning to a machine while
communicating less to humans (who can apply external knowledge, e.g.
"March" = "03"), <abbr> is the appropriate way to abbreviate the
communication for humans.
> I also have a hard time
> with the idea of using <ins> and <del> because their semantic meaning
> is to express content that's been changed[1].
I agree.
> I really think that what's needed, in line with what you're asking, is
> a class name that's canonized as a microformat along these lines:
>
> <span class="datetime iso" title="2006-07-02">July 2, 2006</span>
I see a couple problems with this markup. The content "July 2, 2006"
is not properly classified as "iso" here, as that's not an ISO date.
It looks like you're trying to use the class attribute to classify
the content of the title attribute, but that doesn't work in <span>s
because the contents of the title attribute in <span>s are not
assumed to be equivalent to the element contents. Per HTML specs,
the title attribute in <span>s has less specific meaning than the
title attribute in <abbr>s. In <span>, like most elements, "This
attribute offers advisory information about the element for which it
is set." [1]. But in <abbr>, "The title attribute of these elements
may be used to provide the full or expanded form of the
expression." [2] So to use <span> to provide the full form, we need
to add to HTML's existing semantics, whereas <abbr> already contains
those semantics, as long as we think of it as abbreviated information
rather than abbreviated character count.
This is all relevant to existing specific-purpose date-time
properties, but I think Paul was right to point out that we don't yet
have a compelling use case for generic date information, so it's too
early to be discussing markup for that. What exactly would we want
to do with a generic date apart from any specific context? If it's
only to influence how screen readers read the information aloud, we
should probably get some screen reader developers involved in the
discussion to ensure they adhere to whatever standard we try to
establish. But I suspect there are better groups to tackle that
problem, e.g. WCAG [3].
[1] http://www.w3.org/TR/html401/struct/global.html#h-7.4.3
[2] http://www.w3.org/TR/html4/struct/text.html#h-9.2.1
[3] http://www.w3.org/TR/WAI-WEBCONTENT/
Peace,
Scott
More information about the microformats-discuss
mailing list