Make something amazing, for anyone, at DrupalCon. Standard prices end on August 26.
After a quick chat with @linclark, this issue is to add microdata support to textformatters output.
Thanks, I've added this to the list.
This module should actually already have enough microdata support for the needs of consumers like Google. When a text field type is used, microdata module places the microdata attributes on the field wrapper in a preprocess function. Since Google has a lot of text processing experience, they will often accept microdata that is comma-separated. However, a single string isn't as reusable as it could be for things like jQuery scripts and the like, so you may still want to add support.
There is an $entity->microdata variable that has a nested array of attributes. The '#attributes' array needs to be placed around each value (for example, using a span tag).
Because these are text fields and the microdata module assumes that the properties should go in the field wrapper, it might have somewhat odd results. For example, if text field formatter output the basic HTML:
Positions: Drupal Developer, Cat Herder
Then with the added microdata, the extracted values would be:
We'd really only want the 2nd and 3rd value. I'll have to look to see whether the hooks I've provided can counteract this, or whether I need to make more changes in the core module.
...following. Less vague title for our dashboards ;)
Updated issue summary.
Drupal is a registered trademark of Dries Buytaert.