MDL-65658 mod_forum: Group images links and titles groups
[moodle.git] / mod / forum / templates / forum_discussion_post.mustache
index e5a8e1d..bf8c39f 100644 (file)
@@ -58,6 +58,7 @@
                                     src="{{{.}}}"
                                     alt="{{#str}} pictureof, core, {{author.fullname}} {{/str}}"
                                     aria-hidden="true"
+                                    title="{{author.fullname}}"
                                 >
                             {{/urls.profileimage}}
                         </div>
                     {{#author}}
                         <div class="mr-2 author-groups-container" style="width: 45px; flex-shrink: 0">
                             {{#groups}}
-                                {{#urls.image}}
-                                    <img
-                                        class="rounded-circle w-100"
-                                        src="{{{.}}}"
-                                        alt="{{#str}} pictureof, core, {{name}} {{/str}}"
-                                        aria-hidden="true"
-                                    >
-                                {{/urls.image}}
+                                {{#urls.group}}
+                                    {{#urls.image}}
+                                        <a href="{{urls.group}}" role="button" aria-label='{{#str}} memberofgroup, group, {{name}}{{/str}}'>
+                                            <img
+                                                 class="rounded-circle w-100"
+                                                 src="{{{.}}}"
+                                                 alt="{{#str}} pictureof, core, {{name}} {{/str}}"
+                                                 aria-hidden="true"
+                                                 title="{{name}}"
+                                            >
+                                        </a>
+                                    {{/urls.image}}
+                                {{/urls.group}}
+                                {{^urls.group}}
+                                    {{#urls.image}}
+                                        <img class="rounded-circle w-100"
+                                            src="{{{.}}}"
+                                            alt="{{#str}} pictureof, core, {{name}} {{/str}}"
+                                            title="{{name}}"
+                                        >
+                                    {{/urls.image}}
+                                {{/urls.group}}
                             {{/groups}}
                         </div>
                     {{/author}}