FEATURE: makes create-account userfields using dropdowns accessible (#6991)

FEATURE: makes create-account userfields using dropdowns accessible (#6991)

diff --git a/app/assets/javascripts/discourse/components/create-account.js.es6 b/app/assets/javascripts/discourse/components/create-account.js.es6
index f7b3020..e13fd4c 100644
--- a/app/assets/javascripts/discourse/components/create-account.js.es6
+++ b/app/assets/javascripts/discourse/components/create-account.js.es6
@@ -16,10 +16,22 @@ export default Ember.Component.extend({
         return false;
       }
     });
+
+    this.$().on("click.dropdown-user-field-label", "[for]", event => {
+      const $element = $(event.target);
+      const $target = $(`#${$element.attr("for")}`);
+
+      if ($target.is(".select-kit")) {
+        event.preventDefault();
+        $target.find(".select-kit-header").trigger("click");
+      }
+    });
   },
 
   willDestroyElement() {
     this._super(...arguments);
+
     this.$().off("keydown.discourse-create-account");
+    this.$().off("click.dropdown-user-field-label");
   }
 });

GitHub sha: 47fe34d7