遵守Google的结构化数据政策

时间:2018-11-18 03:13:01

标签: googlebot google-rich-snippets rating-system structured-data

Google的Product structured data reference建议添加aggregateRatingCommon structured data errors文档说:

  

结构化数据引用的内容对用户隐藏。

我的问题是如何验证Google了解我的用户界面?我正在使用(5)个svg星级图像来表示等级,但是有3种口味的星级:空,半和全。我是否需要添加content="rating"title="rating"属性或…?我想了解Google如何知道我完全显示了5星?我可能正在使用.png文件或Unicode★。

  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "88",
    "bestRating": "100",
    "ratingCount": "20"
  }

1 个答案:

答案 0 :(得分:3)

Google没有记录他们如何验证可见内容是否与结构化数据匹配。只要您不隐藏/忽略内容,就可以了。

由于这个以及所有其他原因,使用可访问的语义标记将是有意义的。如果残障用户可以访问它,那么搜索引擎机器人通常也可以访问它。

对于评级,您could use meter element

<meter min="0" max="5" value="3">★★★☆☆</meter>

(由于meter可能不受广泛支持,因此您可能还需要考虑使用WAI-ARIA:example with img elements and aria-labelledby。)