MDL-67899 message: Add aria-label to the emoji picker button
[moodle.git] / message / templates / message_drawer_view_conversation_footer_content.mustache
1 {{!
2     This file is part of Moodle - http://moodle.org/
4     Moodle is free software: you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation, either version 3 of the License, or
7     (at your option) any later version.
9     Moodle is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
14     You should have received a copy of the GNU General Public License
15     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16 }}
17 {{!
18     @template core_message/message_drawer_view_conversation_footer_content
20     This template will render the footer content for the conversation page in
21     the message drawer.
23     Classes required for JS:
24     * none
26     Data attributes required for JS:
27     * All data attributes are required
29     Context variables required for this template:
30     * userid The logged in user id
31     * urls The URLs for the popover
33     Example context (json):
34     {}
36 }}
38 {{#showemojipicker}}
39     <div
40         class="emoji-auto-complete-container w-100 hidden"
41         data-region="emoji-auto-complete-container"
42         aria-live="polite"
43         aria-hidden="true"
44     >
45     </div>
46 {{/showemojipicker}}
47 <div class="d-flex mt-1">
48     <textarea
49         dir="auto"
50         data-region="send-message-txt"
51         class="form-control bg-light"
52         rows="3"
53         data-auto-rows
54         data-min-rows="3"
55         data-max-rows="5"
56         role="textbox"
57         aria-label="{{#str}} writeamessage, core_message {{/str}}"
58         placeholder="{{#str}} writeamessage, core_message {{/str}}"
59         style="resize: none"
60     ></textarea>
62     <div class="position-relative d-flex flex-column">
63         {{#showemojipicker}}
64             <div
65                 data-region="emoji-picker-container"
66                 class="emoji-picker-container hidden"
67                 aria-hidden="true"
68             >
69                 {{> core/emoji/picker }}
70             </div>
71             <button
72                 class="btn btn-link btn-icon icon-size-3 ml-1"
73                 aria-label="{{#str}} toggleemojipicker, core {{/str}}"
74                 data-action="toggle-emoji-picker"
75             >
76                 {{#pix}} e/emoticons, core{{/pix}}
77             </button>
78         {{/showemojipicker}}
79         <button
80             class="btn btn-link btn-icon icon-size-3 ml-1 mt-auto"
81             aria-label="{{#str}} sendmessage, core_message {{/str}}"
82             data-action="send-message"
83         >
84             <span data-region="send-icon-container">{{#pix}} i/sendmessage, core {{/pix}}</span>
85             <span class="hidden" data-region="loading-icon-container">{{> core/loading }}</span>
86         </button>
87     </div>
88 </div>