MDL-68167 lib: Clear single-select autocomplete elements with keyboard
authorShamim Rezaie <shamim@moodle.com>
Thu, 29 Oct 2020 13:39:05 +0000 (00:39 +1100)
committerShamim Rezaie <shamim@moodle.com>
Fri, 30 Oct 2020 05:01:38 +0000 (16:01 +1100)
Following MDL-57680, it should be possible to clear the selected option
using keyboard as well.

lib/templates/form_autocomplete_selection.mustache
user/templates/local/participantsfilter/autocomplete_selection.mustache

index 0476f27..04f1c54 100644 (file)
@@ -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 }}
 </div>
index 57327a8..c365c33 100644 (file)
@@ -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 }}
 </div>