Small issue, which I just wanted to throw out here for comment.
For instance, this patch changes the output of my 'rating' field from
<div class="field-item even" itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
to
<div class="field-item even" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
As far as I know this makes things conform more closely to whatever standard, but I'm not even sure.
If this is sensible, then theme_microdata_item_meta_tags() also needs to be changed to do this for the 'meta' tags. The reason that I didn't include this in the current patch is... that theme_microdata_item_meta_tags() is already being changed in, like, 3 other issues -- among which my just-posted #2036819: Restructure microdata_item() storage. I'll reroll if I get feedback.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | microdata-itemscope-output.patch | 648 bytes | roderik |
Comments
Comment #1
roderikpatch
Comment #2
linclark commenteditemscope is what is called a boolean attribute and the two relevant standards here are XHTML and HTML.
XHTML requires the following formatting for boolean attributes:
itemscope="itemscope"HTML5 allows the following four:
itemscopeitemscope=""itemscope=itemscopeitemscope="itemscope"Because we already comply with one of the allowed HTML5 styles, I don't think it is worth the performance hit.
I would consider making it XHTML compliant by adding the word "itemscope" in the attribute value, but that can happen when the itemscope attribute is being added (rather than in a separate step), so it would not result in any negative impact on performance.
Comment #3
roderikFair enough. I'm kinda learning by coding here (got sucked in by client-site errors) rather than the usual "first know your specs, then start coding" :)
(In all the issues about reported invalid attributes, I first thought this was one. But it wasn't.)
So I'm leaving this open until someone wants to pick it up or close the issue at some point; I think I'm done rerolling for now.
(In the live-chat-in-issue-queue department: I just wanna add 2c to #1947266 and then I'm done adding stuff.)