MDL-61389 mod_forum: Descriptive aria-label for "Discuss this topic"
authorJun Pataleta <jun@moodle.com>
Thu, 13 Feb 2020 08:30:35 +0000 (16:30 +0800)
committerJun Pataleta <jun@moodle.com>
Mon, 17 Feb 2020 07:51:23 +0000 (15:51 +0800)
mod/forum/lang/en/forum.php
mod/forum/templates/social_discussion_list.mustache

index df053be..efa63f3 100644 (file)
@@ -201,6 +201,7 @@ $string['discussionsstartedbyuserincourse'] = 'Discussions started by {$a->fulln
 $string['discussionunpin'] = 'Unpin';
 $string['discussionunsubscribed'] = 'You are now unsubscribed from this discussion.';
 $string['discussthistopic'] = 'Discuss this topic';
+$string['discusstopicname'] = 'Discuss the topic: {$a}';
 $string['displayend'] = 'Display end';
 $string['displayend_help'] = 'This setting specifies whether a forum post should be hidden after a certain date. Note that administrators can always view forum posts.';
 $string['displayenddate'] = 'Display end: {$a}.';
index 6ec2219..d37e6d6 100644 (file)
            {{< mod_forum/forum_discussion_post }}
                {{$footer}}
                    <div class="link text-right">
-                       <a href="{{urls.discuss}}">{{#str}}discussthistopic, forum{{/str}}</a>&nbsp;({{#isreplyplural}}{{#str}} repliesmany, forum, {{discussionrepliescount}} {{/str}}{{/isreplyplural}}{{^isreplyplural}}{{#str}} repliesone, forum, {{discussionrepliescount}} {{/str}}{{/isreplyplural}}{{#discussionunreadscount}}
+                       <a href="{{urls.discuss}}"
+                          aria-label="{{#str}} discusstopicname, forum, {{subject}} {{/str}}">
+                           {{#str}}discussthistopic, forum{{/str}}
+                       </a>&nbsp;({{#isreplyplural}}{{#str}} repliesmany, forum, {{discussionrepliescount}} {{/str}}{{/isreplyplural}}{{^isreplyplural}}{{#str}} repliesone, forum, {{discussionrepliescount}} {{/str}}{{/isreplyplural}}{{#discussionunreadscount}}
                        <span class="sep">/</span>
                        <span class="unread"><a href="{{urls.discuss}}#unread">{{#isunreadplural}}{{#str}} unreadpostsnumber, mod_forum, {{discussionunreadscount}} {{/str}}{{/isunreadplural}}{{^isunreadplural}}{{#str}} unreadpostsone, mod_forum {{/str}}{{/isunreadplural}}</a></span>{{/discussionunreadscount}})
                    </div>