moodle/group/templates/comboboxsearch/group_selector.mustache
Shamim Rezaie 893a9e43d1 MDL-78885 comboboxsearch: Some small fixes
- Remove aria-busy
- Remove aria-label from the listbox element. A listbox that is part of
  a combobox does not need to be labelled.
- No need for the aria-label for the select all checkbox because it is
  already enclosed in the <label> tag.

- Having "view results for ..." as aria-label of listbox options is not
  helpful and only creates noise.
- Deprecated (viewresults,core) as it was not used anymore
- aria-hidden="true" should not be used on .d-none elements
- 'noresults' was falsely documented as a required context variable for
  resultset.mustache. Not only it was not required, it was not even
  provided!

- Remove duplicate code from user_selector.mustache
- Remove the redundant aria-label from search_input_auto. It already has
  a label.
- Fix placeholder missing from one case
2024-03-22 04:25:01 +11:00

44 lines
1.5 KiB
Text

{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_group/comboboxsearch/group_selector
The group selector trigger element.
Context variables required for this template:
* label - The label text fot the group selector element.
* group - The value of the group selector element (id of the preselected group)
* selectedgroup - The text of the selected group option.
Example context (json):
{
"label": "Select separate groups",
"group": "21",
"selectedgroup": "Group 1"
}
}}
<span class="d-none" data-region="groupid" data-groupid="{{group}}"></span>
<div class="align-items-center d-flex">
<div class="d-block pr-3 text-truncate">
<span class="d-block small" aria-hidden="true">
{{label}}
</span>
<span class="p-0 font-weight-bold">
{{selectedgroup}}
</span>
</div>
</div>