schemaorg icon indicating copy to clipboard operation
schemaorg copied to clipboard

Person RDFa example on website email issue unspeficied type?

Open patdavid opened this issue 2 years ago • 6 comments

Apologies if this is not the right place for this.

Trying to add some RDFa to a page of mine and testing on the validator. I've run into the problem of having an "unspecified type" for an email - specifically using the example code from the Person page.

Basically, copying the example for a person on that page using RDFa:

    <div vocab="https://schema.org/" typeof="Person">
      <span property="name">Jane Doe</span>
      <img src="janedoe.jpg" property="image" alt="Photo of Jane Doe"/>

      <span property="jobTitle">Professor</span>
      <div property="address" typeof="PostalAddress">
        <span property="streetAddress">
          20341 Whitworth Institute
          405 N. Whitworth
        </span>
        <span property="addressLocality">Seattle</span>,
        <span property="addressRegion">WA</span>
        <span property="postalCode">98052</span>
      </div>
      <span property="telephone">(425) 123-4567</span>
      <a href="mailto:[email protected]" property="email">
        [email protected]</a>

      Jane's home page:
      <a href="http://www.janedoe.com" property="url">janedoe.com</a>

      Graduate students:
      <a href="http://www.xyz.edu/students/alicejones.html" property="colleague">
        Alice Jones</a>
      <a href="http://www.xyz.edu/students/bobsmith.html" property="colleague">
        Bob Smith</a>
    </div>

Into the Validator doesn't show any errors, but it also doesn't show any value for the email (just Unspecified Type): image

Is this a problem with the example code or the validator?

patdavid avatar Feb 12 '23 18:02 patdavid

I should note that the JSON-LD code does seem to work as expected: image

patdavid avatar Feb 12 '23 18:02 patdavid

And so does the microdata version:

image

patdavid avatar Feb 12 '23 18:02 patdavid

Looks like a problem with the RDFa parser in the validator.

RichardWallis avatar Feb 12 '23 18:02 RichardWallis

This issue is being nudged due to inactivity.

github-actions[bot] avatar May 14 '23 02:05 github-actions[bot]

Does anyone know if this affects Google Rich Snippets? I see that I can add typeof="text" to my tag to make the validator happy, but I don't want to confuse Google.

NotARobit avatar Aug 27 '24 14:08 NotARobit

It appears that email is listed as a property in Person. Rich Snippets does support Person.

If we look in Rich Snippets Organization example, one has the email property at the top level, the second example has the email address nested within ContactPoint. Person also has the contactPoint property, so this might be a work-around.

WeaverStever avatar Aug 27 '24 19:08 WeaverStever

This issue is being nudged due to inactivity.

github-actions[bot] avatar Dec 25 '24 02:12 github-actions[bot]