- 🇬🇧United Kingdom sittard
I'm keen to see this progressing.
I've been debugging our site and I've noticed with search autocomplete enabled the site includes around 50 JS files and with search autocomplete disabled this reduces down to 20 JS files.
It looks like the module has a dependency on `drupal.autocomplete` which has a further dependencies on `core/internal.jquery_ui` and `core/drupal.ajax`
It would be good to address this to improve performance and SEO.
Thanks.
- 🇬🇧United Kingdom sittard
Also just reposting the suggestion from @lukus to replace the autocomplete element with this contrib module:
https://www.drupal.org/project/a11y_autocomplete_element →Plus also pointing to related issue ( https://www.drupal.org/project/drupal/issues/3076171 📌 Provide a new library to replace jQuery UI autocomplete Needs work ) - long read!!! See comment at top.
- 🇦🇹Austria drunken monkey Vienna, Austria
I’m open to any suggestions and MRs. I’m not that good with Javascript myself and have very limited time, so replacing all of this module’s Javascript in order to work with some replacement won’t be possible for me.
- 🇬🇧United Kingdom sittard
I had a quick go:
1) Installed a11y_autocomplete_element module ( https://www.drupal.org/project/a11y_auto → )
2) Replaced ''#type' => 'a11y_autocomplete' anywhere you'd use '#type' => 'select'"
3) Replace dependency 'core/autocomplete' with 'a11y_autocomplete_element/a11y_autocomplete_element'
4) drush crFor some reason `/core/misc/autocomplete.js` library is still loading, any idea why?
Thanks.