This is just me, offering to include jquery.autocomplete.js file from Search Autocomplete (bran 8.x) to Core in replacment for misc/autocomplete.js

Problem/Motivation

This solution helps to improve autocompletion from a UX perceptive. See screenshot:

Proposed resolution

The proposal is to include the features of Search Autocomplete module on Core. As a POC, please have a look at version 8.x which replaces autocomplete.js from Core with a custom js script. This new script allows:
- full compatibility with current formAPI and callback syntax (label, value array)
- compatibility with views (optionnal) to create callback, see the example above. This helps to create multifield results, even "grouped by" as seen in the picture.
- eventually the UI to create autocompletion configurations off any fields without coding (allow activate/desactivate autocompletion for instance)

Main interest is that the approach extend current autocomplete behavior, and is fully compatible with current existing.

NOTE: if you want a try, please refresh cache after install as I could not solve this for this POC:
#2442025: Cache rebuild is applying before library_info_alter() in module install phase.

Remaining tasks

- Extend formAPI to use configurations from UI or create configuration from code directly. This will also let default configurations be targetted using hook_form rather then selectors as per current implementation limit.
- Create disabled by default configurations to provide interesting autocompletions (search block and search page for instance)
- Code review the JS, some of the stuff are "just working for POC" at the moment.

User interface changes

1: Better UX on autocompleted fields.
2: Eventually, a UI to configure, activate and handle completions on your site.

API changes

New configurations on formAPI could be added to have the same configuration options from API then from UI.

CommentFileSizeAuthor
search_autocomplete.png17.62 KBDom.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dom.’s picture

Title: Multifield selection and UX improvment on autocomplete » UX improvment on autocompletion
Dom.’s picture

Dom.’s picture

The multifield and view integration can be included regardless of #2346973: Improve usability, accessibility, and scalability of long select lists although it would have high impacts on menu generation. Waiting to see evolution of this issue, but still opened to discussion on interest of proposal in the meanwhile.

mgifford’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Active » Postponed

I think this probably should be bumped to 8.1.

mgifford’s picture

Status: Postponed » Active

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bnjmnm’s picture

Status: Active » Closed (won't fix)

I found this as it's related to an issue I'm working on: #2346973: Improve usability, accessibility, and scalability of long select lists

I am going to close this as "Won't Fix". I definitely see the appeal in this feature, but I think it's more appropriate for contrib than it is for core. The issue that stands out for me is how this would impact screenreader users. Expanding the autocomplete results beyond a title label would require significantly more listening time and make it difficult to retain all options in working memory. I think it's very unlikely that this would get through the accessibility gate. (fortunately, the 3.5 yrs of inactivity suggest the demand isn't too high for this to be in core anyway)

That said, this would be a contrib module many folks would likely enjoy, and could probably have strong accessibility, even if isn't quite core-gate levels of accessibility.