From cb0bf0ffe019c73fdef27194f47cd18bbc937a71 Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Fri, 30 Oct 2020 00:39:05 +1100 Subject: [PATCH] MDL-68167 lib: Clear single-select autocomplete elements with keyboard Following MDL-57680, it should be possible to clear the selected option using keyboard as well. --- lib/templates/form_autocomplete_selection.mustache | 3 ++- .../local/participantsfilter/autocomplete_selection.mustache | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/templates/form_autocomplete_selection.mustache b/lib/templates/form_autocomplete_selection.mustache index 0476f279ce4..04f1c54cef9 100644 --- a/lib/templates/form_autocomplete_selection.mustache +++ b/lib/templates/form_autocomplete_selection.mustache @@ -44,6 +44,7 @@ }} aria-labelledby="{{selectionId}}-label"{{! }} role="listbox"{{! }} aria-atomic="true"{{! - }} {{#multiple}}tabindex="0" aria-multiselectable="true"{{/multiple}}> + }} tabindex="0"{{! + }} {{#multiple}}aria-multiselectable="true"{{/multiple}}> {{> core/form_autocomplete_selection_items }} diff --git a/user/templates/local/participantsfilter/autocomplete_selection.mustache b/user/templates/local/participantsfilter/autocomplete_selection.mustache index 57327a82aec..c365c33e892 100644 --- a/user/templates/local/participantsfilter/autocomplete_selection.mustache +++ b/user/templates/local/participantsfilter/autocomplete_selection.mustache @@ -44,7 +44,8 @@ }} aria-labelledby="{{selectionId}}-label"{{! }} role="listbox"{{! }} aria-atomic="true"{{! - }}{{#multiple}} tabindex="0" aria-multiselectable="true"{{/multiple}}{{! + }} tabindex="0"{{! + }}{{#multiple}} aria-multiselectable="true"{{/multiple}}{{! }}> {{> core/form_autocomplete_selection_items }}