This would provide more context for screen readers:

<div class="links">
  <a href="<?php print $source_url; ?>"><?php print t('More') . '<span class="element-invisible"> ' . t('about') . ' ' . $title . '</span>'; ?></a>
</div>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mgifford’s picture

Forgot to mention that this is for modules/aggregator/aggregator-summary-items.tpl.php

and that it came up here http://groups.drupal.org/node/143769#comment-477074

Everett Zufelt’s picture

Can this better be resolved by fixing #1136680: #type 'more_link' - previously theme_more_link() - should have more context and using that to theme the link?

If so please mark this as a duplicate of that issue, since we will need to address all 'More' links in a meta patch there.

mgifford’s picture

Status: Active » Closed (duplicate)

It's a specific example, but yes. Think it can be marked as a duplicate.

droplet’s picture

Status: Closed (duplicate) » Postponed

@mgifford,

It converts exist code to use theme_more_link function, may need some more other changes on aggregator.module or whatever. so I reopen this issue and wait for #1136680: #type 'more_link' - previously theme_more_link() - should have more context fixed first.

:)

mgifford’s picture

Sure. Thats a good approach.

Everett Zufelt’s picture

Component: aggregator.module » markup

I expect this can be rolled into the refactoring of templats for html5 initiative, but I'll let someone else decide that.

mgifford’s picture

Issue tags: +html5, +Bartik HTML5

Tagging.

mgifford’s picture

Status: Postponed » Needs review
FileSize
616 bytes

rolling patch..

mgifford’s picture

Status: Needs review » Needs work
Issue tags: +Accessibility, +html5, +Bartik HTML5

The last submitted patch, more-aggregator-template-1136686-8.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review
Issue tags: +a11ySprint

This came up in an in a D7 accessibility review done by http://naric.com/

It's an easy fix, let's get it into D8.

Devin Carlson’s picture

Reroll of #8.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
161.11 KB

This is a simple patch that applies nicely. element-invisible has had enough tests we don't need to try this in a wack of browsers.

xjm’s picture

Hmmm. Is "more about" what this link actually does? I thought it gave me more links to more of the aggregator items.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Hm, right. Also, I'm pretty sure we'd want this entire thing enclosed in t(), to help translators.

mgifford’s picture

True.. I just did a quick search & will make it closer to core/modules/node/lib/Drupal/node/NodeRenderController.php's for $links['node-readmore']:
t('Read more<span class="element-invisible"> about @title</span>', array('@title' => $node_title_stripped,)

It's essentially the same thing.

xjm’s picture

But it's not. In that you're reading more about one item. In this case you're getting more different items. It should be "More posts" or something probably?

mgifford’s picture

I'm fine with that. The text would be more like this then:
More posts (about RSS Feed Title)

Different obviously, but as we'd want it read out.

mgifford’s picture

Status: Needs work » Needs review
FileSize
662 bytes

Revised with <?php print t('More') . '<span class="element-invisible"> ' . t('posts about') . ' ' . $title . '</span>'; ?>

mgifford’s picture

Title: Aggregator Template should be updated » Aggregator Template Needs Context for Accessibility

Fixing patch.

xjm’s picture

Status: Needs review » Needs work
Issue tags: +Accessibility, +html5, +Bartik HTML5, +a11ySprint

The last submitted patch, more-aggregator-template-1136686-19.patch, failed testing.

xjm’s picture

I think maybe for translatability "More posts about %title" should be one string, with the element-invisible inside it? The $title needs to be included in the t(), otherwise this will be nonsensical word order in some languages.

mgifford’s picture

Status: Needs work » Needs review
FileSize
671 bytes

True. Best to address that.

Status: Needs review » Needs work

The last submitted patch, more-aggregator-template-1136686-24.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review
FileSize
673 bytes

quotes...... right.

mgifford’s picture

xjm’s picture

Status: Needs review » Reviewed & tested by the community

Alright, I think this loooks good!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

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

droplet’s picture

Status: Closed (fixed) » Needs work
+++ b/core/modules/aggregator/templates/aggregator-summary-items.tpl.phpundefined
@@ -20,5 +20,5 @@
+  <a href="<?php print $source_url; ?>"><?php print t("More<span class=\"element-invisible\"> posts about %title</span>", array('%title' => $title)); ?></a>

t("....\"...

it looks a bit strange to me. break Drupal code standard ?? :)

xjm’s picture

Status: Needs work » Closed (fixed)

Please file a followup.

star-szr’s picture

@droplet - If it's the backslashes you're worried about, I think we'll be rid of those in #1896060: aggregator.module - Convert PHPTemplate templates to Twig.

droplet’s picture

Thanks @Cottser