Great that there's a link to report spam:
<a href="/node/add/project-issue/webmasters?component=Spam&categories=task&title=Spam%20Report&body=Reporting%20the%20following%20comment%20as%20spam%3A%20https%3A//git7site.devdrupal.org/node/1339130%23comment-7835723">report spam</a>

I did wonder if this should be capitalized, but there's an accessibility problem with this.

It should be something more like:

<a href="/node/add/project-issue/webmasters?component=Spam&categories=task&title=Spam%20Report&body=Reporting%20the%20following%20comment%20as%20spam%3A%20https%3A//git7site.devdrupal.org/node/1339130%23comment-7835723">report spam<span class="element-invisible"> on user USERNAME</a></span>

Comments

tvn’s picture

Title: Report spam link needs more context. » Accessibility problem with 'report spam' link - it needs more context
Project: [Archive] Drupal.org D7 upgrade QA » Drupal.org customizations
Version: » 7.x-3.x-dev
jaypan’s picture

Assigned: Unassigned » jaypan

It should be something more like:

<a href="/node/add/project-issue/webmasters?component=Spam&categories=task&title=Spam%20Report&body=Reporting%20the%20following%20comment%20as%20spam%3A%20https%3A//git7site.devdrupal.org/node/1339130%23comment-7835723">report spam<span class="element-invisible"> on user USERNAME</a></span>

The HTML is invalid, as the span and anchor tags overlap:
<a><span></a></span>

Before I fix this, can I clarify that it should be:
<a href="/node/add/project-issue/webmasters?component=Spam&categories=task&title=Spam%20Report&body=Reporting%20the%20following%20comment%20as%20spam%3A%20https%3A//git7site.devdrupal.org/node/1339130%23comment-7835723">report spam<span class="element-invisible"> on user USERNAME</span></a>

Thank you.

mgifford’s picture

Yup. That looks good. Cut/paste error, thanks for catching it.

mgifford’s picture

Note this is still an error and a violation of WCAG 2.0 AA guidelines.

jaypan’s picture

Sorry, I'm releasing three sites in November, a little bogged down now. I don't have time to figure out how to work in my development environment just yet. After these sites are live (they all should be by the end of the month) I'll be taking care of this.

mgifford’s picture

Thanks for the update. Good luck with the launches.

mgifford’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new703 bytes

I think this is it but I'm having trouble logging in.

It doesn't address drupalorg_node_view_alter(), but I can't find the links to the "Report Spam" on notes either.

Also I note that there's some inconsistency in case in that the comments are all "report spam".

drumm’s picture

Status: Needs review » Active

Committed, http://drupalcode.org/project/drupalorg.git/commit/795ca01. This will go out later today when drupalorg module is merged and deployed.

I had to add 'html' => TRUE so the markup was rendered properly.

Setting back to active for drupalorg_node_view_alter().

mgifford’s picture

Thanks for adding in the HTML setting! I thought I'd got that in but apparently not.

drumm’s picture

This patch caused another problem, #2175545: Including the username in the hidden part (class="element-invisible") of the "report spam" links is not a good idea.. I'll be rolling it back soon. Having the wrong username is worse than no username.

mgifford’s picture

StatusFileSize
new913 bytes

Sorry to hear that. Right.. So the $user is just for a comparison:
if ($build['#comment']->uid != $user->uid) {

How did we miss that when looking at the source.. Ah, yes.. I wasn't logged in at the time... It's obvious on d.o...

Ok, this is tested now to show the appropriate comment username.

drumm’s picture

Status: Active » Needs work

A new user_load() should not be added to this already heavy page (unless really needed). In this case, it isn't needed, comments come with a ->name property.

drumm’s picture

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new792 bytes

That's better.. Thanks!

jaypan’s picture

Thanks for taking care of this - apologies I was so slow.

mgifford’s picture

@drumm Agree with your decision to revert. But now that we've got a patch what else do you need?

Do they need to be re-combined? Marked RTBC again?

@Jaypan - it happens. Will be good to see this issue resolved.

drumm’s picture

Combining so this patch applies against a checkout of this module's Git repo would be ideal.

mgifford’s picture

I applied it here http://spam-drupal.redesign.devdrupal.org/node/2170251

I think that should give you what you need.

jaypan’s picture

Assigned: jaypan » Unassigned
drumm’s picture

Status: Needs review » Fixed
Issue tags: +needs drupal.org deployment

Committed.

drumm’s picture

Issue tags: -needs drupal.org deployment

Deployed.

mgifford’s picture

Thanks @drumm! Looks good. Sorry for the earlier mess-up on this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit 24398f5 on 7.x-3.x, 7.x-3.x-dev by drumm:
    Revert 795ca01 [#2095983] Fix Accessibility problem with 'report spam'...
  • Commit 795ca01 on 7.x-3.x, 7.x-3.x-dev authored by mgifford, committed by drumm:
    [#2095983] Fix Accessibility problem with 'report spam' link - it needs...
  • Commit ec98bdd on 7.x-3.x, 7.x-3.x-dev authored by mgifford, committed by drumm:
    [#2095983] Accessibility problem with 'report spam' link