Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

unor opened this issue Oct 2, 2014 · 12 comments
Assignees
Labels
guidelines docs examples Work on our supporting materials rather than on schema definitions

Comments

@unor
Copy link
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 danbri added the guidelines docs examples Work on our supporting materials rather than on schema definitions label Jan 21, 2015
@danbri
Copy link
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
Copy link
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
Copy link
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
Copy link
Contributor

danbri commented May 12, 2015

/cc @chaals

@danbri
Copy link
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
Copy link
Contributor Author

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
Copy link
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
Copy link
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
Copy link
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
Copy link
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
Copy link
Contributor

danbri commented Apr 19, 2016

Here is a list of every line from an examples*.txt file that contains "<time":

https://gist.githubusercontent.com/danbri/732e6747c4063a548feb0556405a2710/raw/393fea577a18a02802819d80e57a0c58022bd822/gistfile1.txt

danbri added a commit that referenced this issue Apr 19, 2016
danbri added a commit that referenced this issue Apr 19, 2016
danbri added a commit that referenced this issue Apr 24, 2016
danbri added a commit that referenced this issue Apr 28, 2016
Note that our use of @content goes beyond official Microdata, but this
is already heavily done across schema.org and needs exploration elsewhere.
danbri added a commit that referenced this issue Apr 28, 2016
Restoring fixes to #143 to avoid openingHours on <time>.
@danbri
Copy link
Contributor

danbri commented Aug 10, 2016

Published - see http://schema.org/docs/releases.html

@danbri danbri closed this as completed Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidelines docs examples Work on our supporting materials rather than on schema definitions
Projects
None yet
Development

No branches or pull requests

3 participants