[uf-discuss] Question about telephone numbers

Rickards, Julian (NDM) julian.rickards at ontario.ca
Mon Jun 25 05:10:32 PDT 2007


Thanks Paul for your reply but I have two issues with your statements at
the bottom. 


1. I proposed the title attribute to store the telephone type and you
replied that the "title attribute isn't workable with microformats ...
unless it is [in] the abbr tag". My issue with this is that the title
attribute is a Core attribute and may be used in any tag. Therefore, it
should be possible to store this type of information in the title
attribute without requiring the abbr element. The fact that the hCard
specification doesn't allow or support this is another issue but it
should be possible.
 
2. I have never seen reference to anything in the Microformats
specifications that suggest that styling microformats must be compatible
with all browsers which is the only reason why you might want to
consider attribute selectors. Therefore, I don't think that browser
compatibility for attribute selectors should be a valid reason not to
use the title attribute to store the phone type.
 
 
However, as I was thinking about this during this morning, I realized
that microformats do offer an alternative, even if it isn't spelled out
as part of the hCard specification for the telephone component and that
is to use multiple classes. It is perfectly legal (and required in some
instances) to use class="fn n", this pattern could be extended to be
used as class="value work" and class="value home" etc.
 
For example:
 
<div class="tel">
    <div>Toll-free Phone: <span class="value
voice">1-800-567-7890</span></div>
    <div>Toll-free Fax: <span class="value
fax">1-800-567-0987</span></div>
</div>
 
The current format forces us to include "voice" or "fax" in text rather
than in the attributes. In my original case, I didn't want to include
the word "voice" in the text because in the contacts page I was/am
creating, all of the numbers were voice numbers (all of the people in
the contacts page share a single fax number so I didn't need to specify
a fax number for each and use "fax" and "voice" to distinguish them for
each person).
 
The other problem I will encounter is the fact that because my efforts
are on our government web pages (in Ontario, Canada, all government
pages must be in both English and French), I must use the French
equivalent to "voice" and "fax" in the text which means that the
microformat will be broken. However, if "voice" and "fax" were accepted
as attribute values, then I don't need to worry about the text in the
page because the attribute value would be used instead of the text.
 
Jules


------------------------------------------------------------------------
--------
From: microformats-discuss-bounces at microformats.org on behalf of Paul
Wilkins
Subject: Re: [uf-discuss] Question about telephone numbers


From: "Rickards, Julian (NDM)" <julian.rickards at ontario.ca>
>  2.  What about using the title attribute to indicate phone type such
> as <span class="tel" title="work">1-234-567-8901</span>?

That would normally be a great idea, but IE is too thick to understand
attribute selectors.
The title attribute isn't workable with microformats either, unless it
is as
the abbr tag, as that's the only element in which information is stored
from
the title attribute.



More information about the microformats-discuss mailing list