MDL-64985 message: add aria label to cancel selection button
authorSara Arjona <sara@moodle.com>
Mon, 4 Mar 2019 11:41:17 +0000 (12:41 +0100)
committerSara Arjona <sara@moodle.com>
Wed, 24 Apr 2019 15:53:15 +0000 (17:53 +0200)
Add aria labels for cancel edit message button (the little cross
when selecting messages).

lang/en/message.php
message/templates/message_drawer_view_conversation_header_edit_mode.mustache

index e3a2fb7..f6ada68 100644 (file)
@@ -39,6 +39,7 @@ $string['blockuserconfirm'] = 'Are you sure you want to block {$a}?';
 $string['blockuserconfirmbutton'] = 'Block';
 $string['blocknoncontacts'] = 'Prevent non-contacts from messaging me';
 $string['canceledit'] = 'Cancel editing messages';
+$string['cancelselection'] = 'Cancel message selection';
 $string['contactableprivacy'] = 'Accept messages from:';
 $string['contactableprivacy_onlycontacts'] = 'My contacts only';
 $string['contactableprivacy_coursemember'] = 'My contacts and anyone in my courses';
index 3470764..31df078 100644 (file)
@@ -38,7 +38,8 @@
 <div class="d-flex p-2 align-items-center">
     {{#str}} messagesselected:, core_message {{/str}}
     <span class="ml-1" data-region="message-selected-court">1</span>
-    <button type="button" class="ml-auto close" aria-label="" data-action="cancel-edit-mode">
-        <span aria-hidden="true">&times;</span>
+    <button type="button" class="ml-auto close" aria-label="{{#str}} cancelselection, core_message {{/str}}"
+        data-action="cancel-edit-mode">
+            <span aria-hidden="true">&times;</span>
     </button>
 </div>