Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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>
Comment | File | Size | Author |
---|---|---|---|
#26 | more-aggregator-template-1136686-26.patch | 673 bytes | mgifford |
#24 | more-aggregator-template-1136686-24.patch | 671 bytes | mgifford |
#19 | more-aggregator-template-1136686-19.patch | 662 bytes | mgifford |
#13 | More..about_.png | 161.11 KB | mgifford |
#12 | more-aggregator-template-1136686-12.patch | 656 bytes | Devin Carlson |
Comments
Comment #1
mgiffordForgot 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
Comment #2
Everett Zufelt CreditAttribution: Everett Zufelt commentedCan 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.
Comment #3
mgiffordIt's a specific example, but yes. Think it can be marked as a duplicate.
Comment #4
droplet CreditAttribution: droplet commented@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.
:)
Comment #5
mgiffordSure. Thats a good approach.
Comment #6
Everett Zufelt CreditAttribution: Everett Zufelt commentedI expect this can be rolled into the refactoring of templats for html5 initiative, but I'll let someone else decide that.
Comment #7
mgiffordTagging.
Comment #8
mgiffordrolling patch..
Comment #9
mgifford#8: more-aggregator-template-1136686-8.patch queued for re-testing.
Comment #11
mgiffordThis 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.
Comment #12
Devin Carlson CreditAttribution: Devin Carlson commentedReroll of #8.
Comment #13
mgiffordThis 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.
Comment #14
xjmHmmm. Is "more about" what this link actually does? I thought it gave me more links to more of the aggregator items.
Comment #15
webchickHm, right. Also, I'm pretty sure we'd want this entire thing enclosed in t(), to help translators.
Comment #16
mgiffordTrue.. 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.
Comment #17
xjmBut 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?
Comment #18
mgiffordI'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.
Comment #19
mgiffordRevised with
<?php print t('More') . '<span class="element-invisible"> ' . t('posts about') . ' ' . $title . '</span>'; ?>
Comment #20
mgiffordFixing patch.
Comment #21
xjm#19: more-aggregator-template-1136686-19.patch queued for re-testing.
Comment #23
xjmI 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 thet()
, otherwise this will be nonsensical word order in some languages.Comment #24
mgiffordTrue. Best to address that.
Comment #26
mgiffordquotes...... right.
Comment #27
mgifford#26: more-aggregator-template-1136686-26.patch queued for re-testing.
Comment #28
xjmAlright, I think this loooks good!
Comment #29
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #31
droplet CreditAttribution: droplet commentedt("....\"...
it looks a bit strange to me. break Drupal code standard ?? :)
Comment #32
xjmPlease file a followup.
Comment #33
star-szr@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.
Comment #34
droplet CreditAttribution: droplet commentedThanks @Cottser