Opened 12 years ago
Closed 12 years ago
#23128 closed defect (bug) (fixed)
Twenty Twelve: "Post Author" included as hCard names in comments
Reported by: | BrazenlyGeek | Owned by: | lancewillett |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Bundled Theme | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
When Twenty Twelve output comments made by the author of the post being viewed, it appends "Post Author" (wrapped in a SPAN) to the comment author's name.
The problem is that the entire thing (author's name & "Post Author") is wrapped in a CITE with hCard class "fn" applied to it.
This causes hCard parsers to consider "Post Author" to be part of the author's full name, as can be verified by parse results here (http://www.google.com/webmasters/tools/richsnippets) when running through Twenty Twelve-powered posts with comments made by the post author.
Line 289 of Twenty Twelve's functions.php is the relevant line; moving "%2$s" to outside the CITE tag is all that's needed, at least to fix the semantics problem (not sure if there's specific styling attached to the SPAN within the CITE or not).
Attachments (3)
Change History (16)
#2
@
12 years ago
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to 3.6
- Severity changed from trivial to normal
#3
@
12 years ago
Could that be simplified by then removing the SPAN surrounding "post author"?
Instead of this:
SPAN CITE name /CITE SPAN post author /SPAN /SPAN
We'd then have this:
SPAN CITE name /CITE post author /SPAN
(Specifically, I mean removing the SPAN tags from line 292, as the remaining SPAN & CITE tags in the above patch ought to be enough to style the whole phrase [name + "post author"] as needed.)
#4
@
12 years ago
Hm, I don't think this is really possible. We need some kind of markup to be able to style the badge.
My concerns were more about the fact that we use the tag itself (instead of a class for example) to style it and my diff introduces a second element of the same kind. We also could introduce and use a class to style it, I'm just not sure how that would affect backwards compatibility.
#5
@
12 years ago
Can the outer SPAN itself be removed? So instead we have this:
CITE name /CITE SPAN post author /SPAN
I'm by no means a designer so I'm unsure how that affects the design aspect of it, but the idea of nesting non-semantic SPANs seems a bit much.
#7
@
12 years ago
- Summary changed from "Post Author" included as hCard names in Twenty Twelve comments to Twenty Twelve: "Post Author" included as hCard names in comments
#8
@
12 years ago
This relates a bit to #20088 -- if we retrofit Twenty Twelve to use core markup (and not its own custom callback) this ticket will be obsolete.
#9
@
12 years ago
The change in markup could break child theme styles (or sites using Custom CSS on WP.com) that have styled the post author text -- or hidden it, right?
#10
in reply to:
↑ 6
@
12 years ago
Replying to nacin:
Or we just remove the badge.
We can't remove the badge since the theme has no other visual indicator of a post author's comments.
Wrapping it in another span made the most sense to me - might not be the best solution.