W3C home > Mailing lists > Public > public-html@w3.org > July 2009

re: HTML5 Microdata feedback/questions

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 29 Jul 2009 01:16:47 +0000 (UTC)
To: Oli <1.w3c.org@boblet.net>
Cc: public-html@w3.org
Message-ID: <Pine.LNX.4.62.0907290108230.3189@hixie.dreamhostps.com>
On Wed, 15 Jul 2009, Oli wrote:
>
> # 5.4.2 vCard
> 
> I’m a little confused about how to specify multiple types of tel 
> property, and on how to mark up multiple telephone numbers in a vcard. 
> This text is from the description of tel type:
> 
> “Any number of properties with the name type may be present within the 
> item that forms the value of a tel property of an item with the type 
> vcard, but within each such tel property item there must only be one 
> type property per distinct value.”
> 
> Initially I read this as ‘each tel value can only have one type 
> property’ (this sentence is a little difficult to understand), but I 
> now think it means:
> 
> “There can be more than one type property in a tel property value 
> (inside a vcard item), as long as each each type property is associated 
> with only one value”

What it is actually saying is that you can have as many types as you want 
for each telephone number, but you can't have duplicate types per
telephone number.

...so:

   <span itemprop=tel item>
     <span itemprop=type>work</span>,
     <span itemprop=type>home</span>,
     <span itemprop=type>pref</span>:
     <span itemprop=value>+1 555 555 5555</span>
   </span>

...is ok, but this:

   <span itemprop=tel item>
     <span itemprop=type>work</span>,
     <span itemprop=type>work</span>:
     <span itemprop=value>+1 555 555 5555</span>
   </span>

...is not.


> Also, using the spec’s Jack Bauer example (in Japanese for extra fun), would
> this be the correct way to list multiple phone numbers? Because the type
> property spans contain Japanese I’ve used titles—is that correct?

No, title="" has nothing to do with microdata. Use <meta> if you need to 
hide the actual value.

Other than that the sample you give is correct. (Apologies in advance if 
the encoding got corrupted in my reply.)

> <section item="vcard" lang="ja>
> <h1 itemprop="fn">ジャック・バーワ</h1>
> <h2>お問い合わせ</h2>
> <ul itemprop="tel">
> <li item><span itemprop="type" title="work">会社</span>:<span
> itemprop="value">+1 (310) 597 3781</span></li>
> <li item><span itemprop="type" title="fax">ファックス</span>:<span
> itemprop="value">+1 (310) 597 3782</span></li>
> <li item><span itemprop="type" title="cell">携帯</span>:<span
> itemprop="value">+1 (555) 8716 1234</span></li>
> </ul>
> </section>


> # 5.4.2.1 example has an extra >
> 
> <li itemprop="tel" item><span itemprop="value">+1 (310) 555 3781</span>
> <span><meta itemprop="type" content="cell">mobile phone</span>></li>
> →
> <li itemprop="tel" item><span itemprop="value">+1 (310) 555 3781</span>
> <span><meta itemprop="type" content="cell">mobile phone</span></li>

Fixed. I've also added an example of multiple types to clarify the 
previous question.



> # meta vs span with content attribute
> 
> Also, any idea if browsers will make <meta> content attributes accessible to
> end users, eg via tool tips? What are the advantages of including a <meta>
> element are over allowing elements like <span> to also have content
> attributes? eg
> 
> <li itemprop="tel" item><span itemprop="value">+1 (310) 555 3781</span> <span
> itemprop="type" content="cell">mobile phone</span></li>

If you want the value visible, put it in the flow. If you want it hidden 
from the user, use <meta>. There's no way to take the value from a tooltip 
or from some other attribute currently; what's the use case?


> # meta URL
> 
> Finally
> http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#meta
> should probably be
> http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-meta-element
> for consistency.

I don't want to change the non-auto-generated IDs, they're probably 
already being used from other places.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 29 July 2009 01:17:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:42 GMT