From 798edb457c8f86e3fec9b665258a14ca53de9348 Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Wed, 8 Jun 2022 18:39:10 +0200 Subject: [PATCH] MDL-74800 message: fix invalid aria-label attributes --- .../templates/notification_popover.mustache | 18 +++++++++++++----- .../message_drawer_conversations_list.mustache | 4 ++-- .../message_drawer_view_contacts_body.mustache | 9 +++++---- ...sation_header_content_type_private.mustache | 16 ++++++++++------ ...r_content_type_private_no_controls.mustache | 18 +++++++++++------- ...rsation_header_content_type_public.mustache | 16 ++++++++++------ ...essage_drawer_view_overview_header.mustache | 10 ++++++---- ...ssage_drawer_view_overview_section.mustache | 16 +++++++++------- message/templates/message_popover.mustache | 9 +++++++-- .../behat/favourite_conversations.feature | 10 +++++----- .../tests/behat/message_send_messages.feature | 2 +- message/tests/behat/mute_conversations.feature | 8 ++++---- 12 files changed, 83 insertions(+), 53 deletions(-) diff --git a/message/output/popup/templates/notification_popover.mustache b/message/output/popup/templates/notification_popover.mustache index beee4fc6dfc..680eb589ef0 100644 --- a/message/output/popup/templates/notification_popover.mustache +++ b/message/output/popup/templates/notification_popover.mustache @@ -42,11 +42,19 @@ {{$classes}}popover-region-notifications{{/classes}} {{$attributes}}id="nav-notification-popover-container" data-userid="{{userid}}"{{/attributes}} - {{$togglelabel}}{{#str}} shownotificationwindownonew, message {{/str}}{{/togglelabel}} + {{$togglelabel}}{{! + }}{{^unreadcount}} {{#str}} shownotificationwindownonew, message {{/str}} {{/unreadcount}} {{! + }}{{#unreadcount}} {{#str}} shownotificationwindowwithcount, message, {{.}} {{/str}} {{/unreadcount}} {{! + }}{{/togglelabel}} {{$togglecontent}} {{#pix}} i/notifications, core, {{#str}} togglenotificationmenu, message {{/str}} {{/pix}} -
{{unreadcount}}
+ {{/togglecontent}} {{$containerlabel}}{{#str}} notificationwindow, message {{/str}}{{/containerlabel}} @@ -81,9 +89,9 @@ {{/content}} {{/ core/popover_region }} {{#js}} -require(['jquery', 'message_popup/notification_popover_controller'], function($, controller) { +require(['jquery', 'message_popup/notification_popover_controller'], function($, Controller) { var container = $('#nav-notification-popover-container'); - var controller = new controller(container); + var controller = new Controller(container); controller.registerEventListeners(); controller.registerListNavigationEventListeners(); }); diff --git a/message/templates/message_drawer_conversations_list.mustache b/message/templates/message_drawer_conversations_list.mustache index c9e96d740ee..cbe3e0eecc1 100644 --- a/message/templates/message_drawer_conversations_list.mustache +++ b/message/templates/message_drawer_conversations_list.mustache @@ -100,9 +100,9 @@ - {{unreadcount}} + + {{#str}} unreadmessages, core_message, {{unreadcount}} {{/str}}
diff --git a/message/templates/message_drawer_view_contacts_body.mustache b/message/templates/message_drawer_view_contacts_body.mustache index e4fccddd6fc..b945acf98af 100644 --- a/message/templates/message_drawer_view_contacts_body.mustache +++ b/message/templates/message_drawer_view_contacts_body.mustache @@ -65,9 +65,10 @@ > {{#str}} requests {{/str}} - {{contactrequestcount}} + data-region="contact-request-count" + > + + {{#str}} pendingcontactrequests, core_message, {{contactrequestcount}} {{/str}} @@ -95,4 +96,4 @@ {{/ core_message/message_drawer_view_contacts_body_section_requests }}
- \ No newline at end of file + diff --git a/message/templates/message_drawer_view_conversation_header_content_type_private.mustache b/message/templates/message_drawer_view_conversation_header_content_type_private.mustache index 35555c4593b..2ea58936dc1 100644 --- a/message/templates/message_drawer_view_conversation_header_content_type_private.mustache +++ b/message/templates/message_drawer_view_conversation_header_content_type_private.mustache @@ -59,13 +59,17 @@
{{name}} - - {{#pix}} i/star-rating, core {{/pix}} + + {{#pix}} i/star-rating, core, {{#str}} favourites, core {{/str}} {{/pix}} - - {{#pix}} i/muted, core {{/pix}} + + {{#pix}} i/muted, core, {{#str}} mutedconversation, core_message {{/str}} {{/pix}}
{{#showonlinestatus}} diff --git a/message/templates/message_drawer_view_conversation_header_content_type_private_no_controls.mustache b/message/templates/message_drawer_view_conversation_header_content_type_private_no_controls.mustache index 95eaac657d4..799ba62eb24 100644 --- a/message/templates/message_drawer_view_conversation_header_content_type_private_no_controls.mustache +++ b/message/templates/message_drawer_view_conversation_header_content_type_private_no_controls.mustache @@ -58,13 +58,17 @@
{{name}} - - {{#pix}} i/star-rating, core {{/pix}} + + {{#pix}} i/star-rating, core, {{#str}} favourites, core {{/str}} {{/pix}} - - {{#pix}} i/muted, core {{/pix}} + + {{#pix}} i/muted, core, {{#str}} mutedconversation, core_message {{/str}} {{/pix}}
{{#showonlinestatus}} @@ -75,4 +79,4 @@ {{/showonlinestatus}}
- \ No newline at end of file + diff --git a/message/templates/message_drawer_view_conversation_header_content_type_public.mustache b/message/templates/message_drawer_view_conversation_header_content_type_public.mustache index 30000291498..f1bae5f9ba2 100644 --- a/message/templates/message_drawer_view_conversation_header_content_type_public.mustache +++ b/message/templates/message_drawer_view_conversation_header_content_type_public.mustache @@ -58,13 +58,17 @@
{{name}} - - {{#pix}} i/star-rating, core {{/pix}} + + {{#pix}} i/star-rating, core, {{#str}} favourites, core {{/str}} {{/pix}} - - {{#pix}} i/muted, core {{/pix}} + + {{#pix}} i/muted, core, {{#str}} mutedconversation, core_message {{/str}} {{/pix}}

{{subname}}

diff --git a/message/templates/message_drawer_view_overview_header.mustache b/message/templates/message_drawer_view_overview_header.mustache index ef479ea53f2..e8041fdd58f 100644 --- a/message/templates/message_drawer_view_overview_header.mustache +++ b/message/templates/message_drawer_view_overview_header.mustache @@ -67,10 +67,12 @@ {{#pix}} i/user, core {{/pix}} {{#str}} contacts, core_message {{/str}} - - {{contactrequestcount}} + + + {{#str}} pendingcontactrequests, core_message, {{contactrequestcount}} {{/str}}
diff --git a/message/templates/message_drawer_view_overview_section.mustache b/message/templates/message_drawer_view_overview_section.mustache index ed0ce53d4d6..bfa62485333 100644 --- a/message/templates/message_drawer_view_overview_section.mustache +++ b/message/templates/message_drawer_view_overview_section.mustache @@ -54,17 +54,19 @@ {{#pix}} t/expanded, core {{/pix}} {{$title}}{{/title}} -