[uf-discuss] Question about telephone numbers
Paul Wilkins
paul_wilkins at xtra.co.nz
Mon Jun 25 14:38:35 PDT 2007
From: "Rickards, Julian (NDM)" <julian.rickards at ontario.ca>
To: "Microformats Discuss" <microformats-discuss at microformats.org>
Sent: Tuesday, June 26, 2007 12:10 AM
Subject: RE: [uf-discuss] Question about telephone numbers
> 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.
Because something is possible doesn't mean that it's a good idea.
Microformats are designed to be applied on pre-existing information, and if
any of that information has title attributes already applied to it, we don't
want that information to mistakenly flow over into the microformat itself.
> 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.
I'm thinking about styles that may want to be applied to the abbr tag. IE
just won't allow this to occur.
> 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>
This technique is in danger of overloading the already crowded class name
space. The number of class names that are used should be kept to a minimum.
> 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.
This was covered recently, and general consensus is that the abbr design
pattern is the most appropriate choice on resolving such issues.
<abbr class="type" title="fax">Téléc</abbr>
--
Paul Wilkins
More information about the microformats-discuss
mailing list