Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

If meter, data use element text after content/value attributes #39

Closed
chaals opened this issue May 19, 2017 · 0 comments · Fixed by #40
Closed

If meter, data use element text after content/value attributes #39

chaals opened this issue May 19, 2017 · 0 comments · Fixed by #40

Comments

@chaals
Copy link
Collaborator

chaals commented May 19, 2017

<div itemscope itemtype="http://schema.org/CreativeWork">
<data itemprop="name" value="data value attribute" content="data content attribute" >data element text content</data>
<data itemprop="name" value="lone data value attribute" >missed data element' value attribute [BUG]</data>
<data itemprop="name">data used its element's textContent</data>
<meter itemprop="name" content="meter content attribute" value="meter value attribute">meter element text content</meter>
<meter itemprop="name" value="lone meter value attribute" >missed meter element's value attribute [BUG]</meter>
<meter itemprop="name">meter used its element's textContent</meter>
</div>

in the SDL generates:

data content attribute
meter used its element's textContent
lone meter value attribute
data used its element's textContent
lone data value attribute
meter content attribute

and in Google's SDTT gives

@type: CreativeWork
name: data content attribute
name: missed data element' value attribute [BUG]
name: data used its element's textContent
name: meter content attribute
name: missed meter element's value attribute [BUG]
name: meter used its element's textContent

I'll do more testing, but I think modulo the apparent bug in Google of not reading the value attribute at all, I think we should align the value algorithm to match this behaviour. See also #20, #38

chaals pushed a commit that referenced this issue May 19, 2017
see #20, #38, #39

Note that if there is a `content` attribute is is selected **in
preference** to another specific attribute, including `src` and `href`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant