Silly microformats question
I’ve been a bit wary of microformats, as I believe they play fast and loose with the semantics of the abbr element. They do this simply to accommodate Safari’s broken support for object, and thereby force a screenreader user who listens to titles to sit though monstrous reams of numbers or other data, that’s meant for machines not people.
But, I’ll try anything once (except necrophilia and Morris dancing), so decided to make a punter’s Contact Us page into an hCard.
And discovered it’s just too damn difficult for my wee brain to deal with. Here’s the deal: I need to mark up the following contact phone numbers (and it seems to me that helpline opening hours are part of contact details, phone prices arguably so):
Helpline - 0845 123 1234, Open Monday to Friday, 8am to 6pm, Calls to our helpline cost no more than 5p per minute for BT customers; other networks may vary.
Tel: 01926 123456
International: +44 (0)1926 123456
Fax: 01926 89123
Minicom: 0845 123 4567
Nothing in the type subproperty values list gives me any clue. Do you know, gentle reader?
16 Responses to “ Silly microformats question ”
Like Trev said, but I would be inclined to markup the word ‘international’ with a SPAN rather than ABBR whether it is a correct hCard ‘attribute’ or not.
[span type="tel" title="intl"]international[/span]
What am I saying… I got that example all wrong…
[span class="type" title="intl"]international[/span]
Sorry.
I wasn’t 100% sure, but you need to be using the abbr, like I’ve done for the Fax example. You can find more information about that at - http://microformats.org/wiki/hcard-examples#3.3.1_TEL_Type_Definition
If the text doesn’t match the value, then you use abbr, in the example it shows [abbr class="type" title="msg"]voicemail[/abbr]
(I’ve nothing helpful to say, particularly, but this struck me):
Using the title attribute like that seems so fundamentally opposed to the principles of semantic mark-up, and by extension precisely the opposite of what microformats are supposed to accomplish.
What on earth happened to making use of XHTML and sticking additional attributes in a separate namespace? This bastardisation of attributes in the (wrongful) name of ‘semantics’ seems to be a case of cutting off the nose to spite the face.
Instead of just forgetting about the hCard completely, why not just mark up the two telephone numbers, the helpline and the normal telephone number…
Helpline - [span class=”tel”]0845 123 1234[/span], Open Monday to Friday, 8am to 6pm, Calls to our helpline cost no more than 5p per minute for BT customers; other networks may vary.
Tel: [span class=”tel”]01926 123456[/span]
That means you get the extra information, without overdoing on the use of span (or any other inline element you want to use) and you wouldn’t feel bad in abusing the abbr element.
Is using abbr when you want an acronym ‘wilfully misuing’ it? It’s not as complete as it can be, but it’s not incorrect. Because every acronym is an abbreviation. In fact it’s a hundred times better than people using acronym all the time, because IE refuses to acknowledge abbr!
Wrapping some or all of “Helpline - 0845 123 1234, Open Monday to Friday, 8am to 6pm, Calls to our helpline cost no more than 5p per minute for BT customers; other networks may vary.” in a span (or whatever) with class=”note” will include it in the hCard as a free-text note field.
P.S. do I win a prize?
You could always ask Glen Jones at Web DD on Saturday
P.P.S. The International standard for telephone number display specifies that your “+44 (0)1926 123456″ should be “+44 1926 123456″.
Omit the markup on one of the phone numbers and mark up the other as, say:
<abbr title=”+44 1926 123456″>01926 123456</abbr>
(Your valid concerns about abbr/msg/voicemail not withstanding, of course.)
Two prizes?
Regards,
Just been shown this one:
http://www.informatik.uni-hamburg.de/SVS/personnel/henrich/index.php
As well as Andy’s use of ABBR to include the international format telephone number over the human-readible UK format, you could also do this:
[span class="tel"][span class="value"]+44[/span] (0) [span class="value"]1926 123456[/span][/span]
Those two ‘value’ spans will then be appended together to make a valid international format number, without the human-readable ‘(0)’ breaking it.
And of course, you don’t have to use SPANs and DIVs, if there’s a more appropriate structural element available.
I do not believe that you can (currently) add the opening hours and prices to the phone information. This is becuase hCards are based upon the vCards specification and it’s not in there (I think). Open up your contacts in Outlook or Address Book (or whatever you use). The fields in there, are the kind of fields you can use in a hCard, although I don’t think every input has been migrated in to the HTML ’spec’
Helpline - [span class="tel"]0845 123 1234[/span], Open Monday to Friday, 8am to 6pm, Calls to our helpline cost no more than 5p per minute for BT customers; other networks may vary.
Tel: [span class="tel"]01926 123456[/span]
[span class="tel"][abbr class="type" title="intl"]International[/abbr]: [span class="value"]+44 (0)1926 123456[/span][/span]
[span class="tel"][abbr class="type" title="fax"]Fax[/abbr]: [span class="value"]01926 89123[/span][/span]
Minicom: [span class="tel"]0845 123 4567[/span]
wow, a lot of spans (problem with marking up phone numbers IMO). And I THINK that’s correct. Although, the international value is from the ‘adr’ type property, and there doesn’t seem to be one for the telephone.