#5726 closed defect (bug) (fixed)
Fix blog commenter JS link transformation
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | high | |
Component: | Make (Get Involved) / P2 | Keywords: | seo accessibility |
Cc: |
Description (last modified by )
Links to comment authors on o2 blog posts behave in ways that are harmful to our SEO and to accessibility. There's a heavy reliance on JavaScript, which alters the markup and properties of links to author profiles/sites.
I'm unsure how much of this is normal o2 behaviour, and how much of it is our own customization (or editable from a theme context). Regardless, these issues need to be resolved.
On archive templates
E.g., the core blog front page
See that:
- Markup for comments are injected via JS after page load.
- The comment author name is linked, with a rel attribute having
external
andnofollow
attributes.
E.g.,<a href="https://profiles.wordpress.org/schlessera/" rel="external nofollow" class="comment-author url ">Alain Schlesser</a>
.
We need to:
- Remove the
rel
property from the JS templating system.
On single post templates
E.g., this recent core blog post
See that:
- Comment author URLs link to the user's domain, with a rel attribute having
external
,nofollow
andugc
attributes.
E.g.,<a href='https://www.alainschlesser.com/' rel='external nofollow ugc' class='url'>Alain Schlesser</a>
.
- This is overwritten with JS, which alters the href attribute to reference the user profile URL (and alters the
rel
attribute, removing theugc
value).
E.g.,<a href="https://profiles.wordpress.org/schlessera/" rel="external nofollow" class="comment-author url ">Alain Schlesser</a>
.
We need to:
- Correct the underlying server-side logic, so that commenter links reference their profile URL, and omit the
rel
property.
- Remove the JS replacement logic (or, alter it so that it's consistent with / doesn't alter the commenter link)
Notes
- The JS template/compontent replacement in both templates looks to be powered by the o2 HTML fragment with ID
tmpl-o2-comment
.
Change History (5)
Note: See
TracTickets for help on using
tickets.
This was an issue I initially pointed out to Jono
It seems from a brief analysis that there is a desire for profiles to be indexed by Google.
Links from there seem to be followed to plugins authored, plugin pages link back in various ways etc.
This is also normal/expected for internal linking to user profiles and why profiles on Twitter frequently rank highly.
Best case for a search engine's interpretation of the current author links is that it is confusing.
Worst case is it is a form of cloaking because the crawler might see something different to a human.
But it is also suboptimal to help boost discovery, crawl, indexing & ranking anyway.
The quick solution to the confusing/cloaking issue would be to just change the external domain URL to # and remove the rel attributes completely.
That would be a high priority minimal fix
Google can see the rendered javascript
https://search.google.com/test/mobile-friendly
However that doesn't mean relying on javascript for the link is desired. Google has crawling and rendering budgets. The more work they have to do the less they see.
It would be far better to have the profile link rendered in the HTML server-side and remove the need for the javascript.