From 0188cc2ed7d238bc8903e0d689c324863eb94d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Mon, 21 Sep 2020 22:10:34 +0200 Subject: [PATCH] MDL-67275 forum: Fix language and accessibility issues with buttons There were inconsistencies with the text shown on the submit button, depending on the where the button was shown. * Inline reply forum displayed general "Submit". * Experimental nested discussion view reply form displayed "Post" (post/core string) which acts as a noun in other contexts and cannot be used as such in many non-English languages. * Advanced reply form displayed "Post to forum". The patch fixes this and starts to show "Post to forum" in all three places consistently. While working on this, two more issues were noticed and fixed: * Inline reply textarea's title was hard-coded English "post" text. Changed to "Message" to provide advisory information related to the element. * Buttons contained title attribute with the same value as the explicit button text. This goes against accessibility guidelines. --- mod/forum/templates/inpage_reply.mustache | 10 +++++----- mod/forum/templates/inpage_reply_v2.mustache | 2 +- mod/forum/tests/behat/behat_mod_forum.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mod/forum/templates/inpage_reply.mustache b/mod/forum/templates/inpage_reply.mustache index ddcb978b82e..0a6a2d3582f 100644 --- a/mod/forum/templates/inpage_reply.mustache +++ b/mod/forum/templates/inpage_reply.mustache @@ -38,7 +38,7 @@
- + @@ -46,11 +46,11 @@
- - {{#canreplyprivately}} @@ -59,7 +59,7 @@
{{/canreplyprivately}} - diff --git a/mod/forum/templates/inpage_reply_v2.mustache b/mod/forum/templates/inpage_reply_v2.mustache index 4794aa3da95..316d5e4fd43 100644 --- a/mod/forum/templates/inpage_reply_v2.mustache +++ b/mod/forum/templates/inpage_reply_v2.mustache @@ -74,7 +74,7 @@