MDL-68167 lib: Fix label for autocomplete selection/suggestion box
authorShamim Rezaie <shamim@moodle.com>
Tue, 28 Jul 2020 16:45:30 +0000 (02:45 +1000)
committerShamim Rezaie <shamim@moodle.com>
Fri, 30 Oct 2020 05:01:38 +0000 (16:01 +1100)
commitb6d733dd4e67ced02266ced570c35f0a75783a8c
tree0ab6a65fdfb5d968a28e047268db042ad2b365dd
parentceda24637da5491619cff72902addf70242e3a91
MDL-68167 lib: Fix label for autocomplete selection/suggestion box

The content of the autocomplete selection div is purged by javascript
so we have to move its label outside of it. aria-labeledby is the way
to go.

Each time the suggestion box is expanded, autocomplete js renders the
autocomplete suggestions template. So the label cannot be outside the
suggestions ul.
lang/en/form.php
lib/templates/form_autocomplete_selection.mustache
lib/templates/form_autocomplete_suggestions.mustache
user/templates/local/participantsfilter/autocomplete_selection.mustache