Examples on openingHours should not use the 'time' element #143

Closed
unor opened this Issue Oct 2, 2014 · 12 comments

Projects

None yet

3 participants

@unor
Contributor
unor commented Oct 2, 2014

http://schema.org/openingHours

The examples on openingHours use HTML5’s time element:

<time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>
<time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>

The values "Tu,Th 16:00-20:00" and "Mo-Su" don’t seem to be valid according to W3C’s HTML5 or according to WHATWG’s HTML.

The examples on LocalBusiness use the meta element instead, which seems to be appropriate. The data element might also be an appropriate alternative.

@danbri danbri added this to the sdo-gozer release milestone Jan 21, 2015
@danbri danbri self-assigned this Jan 21, 2015
@danbri
Contributor
danbri commented Jan 21, 2015

I had a chat with Hixie about possibly getting HTML updated to allow this, if/when we get this micro-notation properly spec'd. But for now, I agree, time element is in-apropes.

@danbri danbri added the needs review label Jan 21, 2015
@danbri
Contributor
danbri commented Mar 9, 2015

Another nudge that we should address this. https://twitter.com/Nettsentrisk/status/574859464316219392

I'd suggest:

  • stop promoting for this markup
  • specify the openingHours microsyntax more formally, suggest it to HTML5 groups for use with
@danbri
Contributor
danbri commented May 12, 2015

This needs doing, but bumping one more milestone.

Here's a grep of what's in the examples:

<time itemprop="validFor" content="P1Y">1 year</time>
 <time property="validFor" content="P1Y">1 year</time>
 <div>asked <time itemprop="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
   <div>answered <time itemprop="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
   <div>answered <time itemprop="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
 <div>asked <time property="dateCreated" datetime="2010-11-04T20:07Z">Nov 11 '10 at 20:07</time></div>
   <div>answered <time property="dateCreated" datetime="2010-12-01T22:01Z">Dec 1 '10 at 22:01</time></div>
   <div>answered <time property="dateCreated" datetime="2010-12-06T21:11Z">Dec 6 '10 at 21:11</time></div>
 <p>Open: <time itemprop="openingHours" datetime="Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00">Daily from 11:30am till 11pm</time></p>
 <p>Open: <time property="openingHours" datetime="Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00">Daily from 11:30am till 11pm</time></p>
   <p>Normally open <time itemprop="openingHours" datetime="Mo,Tu,We,Th,Fr,Sa,Su 09:00-14:00">daily 9am-2pm</time> except on:</p>
 <p>Normally open <time property="openingHours" datetime="Mo,Tu,We,Th,Fr,Sa,Su 09:00-14:00">daily 9am-2pm</time> except on:</p>
 <p>Open: <time itemprop="openingHours" datetime="Mo,Tu,We,Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
 <p>Open: <time property="openingHours" datetime="Mo,Tu,We,Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
     <p>Open: <time property="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
     <p>Open: <time property="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Fr 13:00-17:30">Open weekdays 1pm-5:30pm.</time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Fr 13:00-17:30">Open weekdays 1pm-5:30pm.</time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
  <p>Open: <time itemprop="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
   <p>Open: <time itemprop="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Fr 07:00-23:00">Monday-Friday 7am-11pm </time></p>
   <p>Open: <time property="openingHours" datetime="Mo-Th 09:00-12:00">Monday-Thursday 9am-noon</time></p>

Are the P1Y values legit? i.e.

1 year

?

@danbri
Contributor
danbri commented May 12, 2015

/cc @chaals

@danbri
Contributor
danbri commented Mar 7, 2016

@unor looking at #533 (via #1012 which reminds us that http://schema.org/openingHours syntax isn't appropriate for 'time' element), it looks like your fixes don't directly address this problem. Am I missing something?

@unor
Contributor
unor commented Mar 7, 2016

@danbri Right, #533 only fixes/improves the OpeningHoursSpecification example "Middle of Nowhere Foods". It was not meant to fix this issue here about the description/definition of the openingHours property.

@danbri
Contributor
danbri commented Mar 7, 2016

Ah, then I misunderstood your comment in #1012 - just wanted to make sure I wasn't overlooking an existing fix

@danbri
Contributor
danbri commented Apr 11, 2016

Ping @chaals - can you suggest what we should do here? For openingHours microdata/rdfa attribute on an element instead of the 'time' element... which element to use? /cc @betehess who suggested some other opening hours cleanup in #923.

@danbri
Contributor
danbri commented Apr 11, 2016

The 'data' element was suggested

These both say "When the value is date- or time-related, the more specific time element can be used instead." which more or less advocates for the current usage of 'time'. Except the actual definition of 'time' isn't so broad and our usage is not currently a good fit.

So my suggestion is:

  • We change all our use of 'time' to 'data' element in examples.
  • We consider optionally reverting that for the 2 cases with: itemprop="validFor" content="P1Y" ...
@mfhepp
Contributor
mfhepp commented Apr 12, 2016

+1
The on- and off-relationship of the HTML5 spec with the element is hard to understand from an outsider perspective anyway.

RDFa was simpler in that aspect with a separate datatype mechanism and the choice of arbitrary HTML elements for any kind of data ;-)

Martin

On 11 Apr 2016, at 17:56, Dan Brickley notifications@github.com wrote:

The 'data' element was suggested

https://html.spec.whatwg.org/multipage/semantics.html#the-data-element
https://www.w3.org/TR/html5/text-level-semantics.html#the-data-element
These both say "When the value is date- or time-related, the more specific time element can be used instead." which more or less advocates for the current usage of 'time'. Except the actual definition of 'time' isn't so broad and our usage is not currently a good fit.

So my suggestion is:

• We change all our use of 'time' to 'data' element in examples.
• We consider optionally reverting that for the 2 cases with: itemprop="validFor" content="P1Y" ...

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@danbri
Contributor
danbri commented Apr 19, 2016
@danbri danbri pushed a commit that referenced this issue Apr 19, 2016
Dan Brickley Changed 'time' to 'span' for opening hour values, and content to date…
…time attribute otherwise.

Fixes ##143
0439eb4
@danbri danbri pushed a commit that referenced this issue Apr 19, 2016
Dan Brickley Documented fix for #143 f2d51b0
@danbri danbri pushed a commit that referenced this issue Apr 24, 2016
Dan Brickley Markup fixes
Thanks, @unor
See #533 #143 #1012.
c05dd11
@danbri danbri pushed a commit that referenced this issue Apr 28, 2016
Dan Brickley Restoring fixes to #143 to avoid openingHours on <time>.
Note that our use of @content goes beyond official Microdata, but this
is already heavily done across schema.org and needs exploration elsewhere.
e880065
@danbri
Contributor
danbri commented Aug 10, 2016
@danbri danbri closed this Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment