Yahoo! Tech launched with basic support for the hReview microformat. Initially, I had no way of testing the output and didn’t realize our limited output. Tails, a Firefox extension, has helped me fine-tune the hReviews. However, Yahoo! Tech still has an outstanding bug with these reviews.

microformats logo
Due to the modular construction of this page,  I am not able to get the product name into the hReview. Dan Cederholm’s post about using the object include microformat pattern may actually solve this issue.

The include pattern lets you define the product or person’s identity earlier in the page and then reference it in individual reviews or blog posts with an object tag. Unfortunately, Safari and Internet Explorer do not behave properly when the object element appears multiple times. An updated version of the pattern uses the link tag instead.

Link-based Object Pattern

Before you get to your reviews, define the product or person with the microformat classes item and fn. Item defines the nature of the content and fn tells us the content is the formatted name of the item. You’ll also need to add a unique id.

  1. <h3 class=“item fn” id=“prodname”>Product  Name</h3>

In your hReview, you need to reference this product by its id.

  1. <a href=“#prodname” class=“include microformatdetail”></a>

Unfortunately, a screen reader will announce this as a link. We have a special class, microformatdetail, to hide microformat details that are not part of the visual design. This is a convenient way to add some background information to your hReview, hCard, and hCalendar elements.

  1. .microformatdetail {display:none; /*content for microformat  parsing only */}

The final Yahoo! Tech hReview microformat

Let’s look at the code for a digital camera product page. We’ll first define the product name in the top module and then present the reviews later on the page.

Add the product name at the top of the page

  1. <h2 id=“prodname” class=“item fn”>Olympus  CAMEDIA C-5500 Sport Zoom Digital Camera</h2>

Create an individual review

Note: the new link is at the end of the metadetails paragraph

  1. <div class=“arating hreview”>
  2. <div class=“hd”>
  3. <h3 class=“summary”>good camera</h3>
  4. <p class=“metadetails”>By <a href=“foo.html” title=“visit John Doe’s profile page” class=“reviewer fn”>John Doe</a> - <a href=“foo.html “>See all John Doe’s reviews</a> - <span class=“dtreviewed”>02/09/06</span> <a href=”#prodname” class=”include microformatdetail”></a></p>
  5. </div>
  6. <div class=“bd”>
  7. <div class=“ratreviewsummary”>
  8. <ul class=“ratingslist”>
  9. <li class=“overall stars10″>Overall: <span title=“John Doe gave this product 5 out of 5 stars for Overall quality”><em class=“rating”>5</em>/5 </span></li>
  10. <li class=“bars10″>Features: <span title=“John Doe gave this product 5 out of 5 stars for Features” class=“rating”>5/5 </span></li>
  11. <li class=“bars10″>Quality: <span title=“John Doe gave this product 5 out of 5 stars for Quality” class=“rating”>5/5 </span></li>
  12. <li class=“bars10″>Support: <span title=“John Doe gave this product 5 out of 5 stars for Support” class=“rating”>5/5 </span></li>
  13. <li class=“bars10″>Value: <span title=“John Doe gave this product 5 out of 5 stars for Value” class=“rating”>5/5 </span></li>
  14. </ul>
  15. <dl class=“procons description “>
  16. <dt>Pros:</dt>
  17. <dd>great camera</dd>
  18. </dl>
  19. <dl class=“procons “>
  20. <dt>Cons:</dt>
  21. <dd>blurry when flash is off</dd>
  22. </dl>
  23. </div>
  24. <div class=“ytuserreviewtext”><p class=“description”>I got it for 170 $ it us a great camera, I have loved it great pictures great features and a great value i would recomend it to any one</p></div>
  25. </div>
  26. </div>

How is the hReview actually used?

We are still working on this final element of hReviews on our product pages. Once it is live, we should begin seeing the benefits. Technorati is the first search engine to begin scraping microformatted information. When hReviews become more prevalent, more search engines and sites will consolidate products with their reviews from around the web. This will give users much more flexibility with shopping decisions.

Resources


2 Responses to “The hReview format on Yahoo! Tech”  

  1. 1 Paul Stamatiou

    I really love how Yahoo! is completely utilizing microformats. It’s really making it future-proof.

  1. 1 Tails Release 0.3.2 « Don’t Forget to Plant It!


Leave a Reply