MDL-35971 mod_forum: Add proper discussion list table description
authorJun Pataleta <jun@moodle.com>
Fri, 13 Dec 2019 08:36:26 +0000 (16:36 +0800)
committerJun Pataleta <jun@moodle.com>
Wed, 8 Jan 2020 07:37:42 +0000 (15:37 +0800)
mod/forum/lang/en/forum.php
mod/forum/templates/discussion_list.mustache

index 537f870..422b100 100644 (file)
@@ -645,7 +645,7 @@ $string['sendstudentnotificationsdefault'] = 'Default setting for "Notify studen
 $string['sendstudentnotificationsdefault_help'] = 'Set the default value for the "Notify students" checkbox on the grading form.';
 $string['settings'] = 'Settings';
 $string['shortpost'] = 'Short post';
-$string['showingcountoftotaldiscussions'] = 'Showing {$a->count} of {$a->total} discussions';
+$string['showingcountoftotaldiscussions'] = 'List of discussions. Showing {$a->count} of {$a->total} discussions';
 $string['showgraderpanel'] = 'Show grader panel';
 $string['showpreviousrepliescount'] = 'Show previous replies ({$a})';
 $string['showsubscribers'] = 'Show/edit current subscribers';
index 74dc110..b72498f 100644 (file)
             {{{ pagination }}}
         {{/discussion_top_pagination}}
         {{$discussion_list_output}}
-            <span id="discussion-table-description-{{uniqid}}" class="sr-only">
-                {{#str}} showingcountoftotaldiscussions, mod_forum, {"count": "{{visiblediscussioncount}}", "total":"{{totaldiscussioncount}}"} {{/str}}
-            </span>
-            <table
-                class="table discussion-list"
-                aria-label='{{#str}} showingcountoftotaldiscussions, mod_forum, {"count": "{{visiblediscussioncount}}", "total":"{{totaldiscussioncount}}"} {{/str}}'
-                aria-describedby="discussion-table-description-{{uniqid}}"
-            >
+            <table class="table discussion-list">
+                <caption id="discussion-table-description-{{uniqid}}" class="sr-only">
+                    {{#str}} showingcountoftotaldiscussions, mod_forum, {"count": "{{visiblediscussioncount}}", "total":"{{totaldiscussioncount}}"} {{/str}}
+                </caption>
                 {{$discussion_list_header}}
                 <thead>
                     <tr>