For quite a while, I have been arguing that RDFa as a syntax for structured data in Web content is problematic when it comes to exposing more granular data than just a few property names. While many advocates of RDFa stressed that reusing the exact same visible elements for structured data markup, as in this example
<body> <div property="vcard:tel">+49-89-1234-0</div> </body>
was beneficial because it reduces redundancy, it also raises complexity for developers, since you violate the principle of “separation of concerns” – you have to align a given HTML tree structure with a given data structure, dictated by the vocabulary, like schema.org or GoodRelations.
As a consequence, I once developed and promoted the “RDFa in Snippets Style” approach, where the RDFa markup would reside in blocks of invisible
<span> elements, like this:
<body> <!-- Content for humans --> <div>+49-89-1234-0</div> <!-- RDFa rich meta-data --> <div property="vcard:tel" content="+49-89-1234-0"/> </div> </body>
This has been a big success – most of the GoodRelations extensions for shop software, running on at least 20,000 Web shops globally, use that approach and get their content honored by Google.
Now, one caveat has always been that Google indicated that invisible markup, i.e. RDFa elements that do not reuse visible content, would not be honored. The likely rationale for that guideline was that
- invisible markup invites spammers that try to manipulate the search engine,
- a link to human-readable content allows to combine the structured data and the textual content for information extraction heuristics, and
- the data quality is likely higher for visible content (since humans will complain otherwise).
Now, in silence, RDFa in “Snippet Style” (and similar patterns in Microdata) have for long been accepted by Google, as long as other quality indicators for the site were positive. But there was always a doubt, which was bad, since the development effort for weaving in advanced data markup in RDFa or Microdata syntax into HTML templates in a form that combined visible content elements with data markup was, in my experience, 5 – 10 times higher as compared to using RDFa in “Snippet Style”.
The bigs news is that this uncertainty is going away, since Google now openly moves to accepting data markup in JSON-LD syntax not tied to visual elements.
Of course, this is just a first signal, but I personally think that in the future, we will see JSON-LD in script elements for all advanced data markup, and RDFa and Microdata only for the very simple use-cases.
That is a good sign towards a broader use of data markup for e-commerce, for sure.