Problem/Motivation
JQuery UI was added as a dependency for core 10 years ago to improve our UX. Since then majority of the frontend community has moved on to using other libraries. For that reason, JQuery UI has been having trouble attracting new maintainers, and has been unmaintained since 2017 as announced by one of the maintainers of the project in this blog post. The most recent release was published in 2016 and there's no one responding to PRs in their Github repository.
In the meantime the former jQuery foundation became the JS foundation which merged with Node's foundation and formed OpenJS Foundation. That lists jQuery UI as an Emeritus project in https://openjsf.org/projects/ which is described as:
Emeritus projects are those which the maintainers feel have reached or are nearing end-of-life
#3051352: [Plan] Remove unused jQuery UI components and replace with a suite of contrib packages for the continuous upgrade path provides a plan for libraries that are unused.
Proposed resolution
List of jQuery UI components in the scope of this issue:
- jquery.ui.dialog: #2158943: Replace jQuery UI dialog with supported library or polyfill
- jquery.ui.autocomplete: #3076171: Provide an experimental module to replace jQuery UI autocomplete with awesomplete
- jquery.ui.datepicker: #3072906: Deprecate and remove jQuery UI datepicker
- jquery.ui.sortable: #3064049: Replace jQuery UI sortable with Sortable js
- jquery.ui.tabs: #3070369: Remove Drupal\views_ui\ViewEditForm::form dependency to jQuery UI tabs⇢ this means that this has zero uses in core, so it can now be deprecated as part of #3067251: Deprecate unused jQuery UI components in favour of a suite of contrib modules
- jquery.ui.draggable #3079748: Deprecate jquery.ui.draggable
- jquery.ui.position: #3074267: Replace jQuery UI position() with PopperJS
With these components, we have a few different directions we could choose to go to:
- Replace jQuery UI components with a set of individual libraries.
- Rebuild jQuery UI functionality ourselves. This could be done either by using vanilla JavaScript or by using a framework such as React.
- Fork the parts of jQuery UI that are used by Drupal core, and provide support to the forked project ourself.
Various proposed replacements
(Libraries specific to only one component can be documented in the appropriate issue.)
- https://allyjs.io/api/index.html#finding-elements
- http://youmightnotneedjqueryplugins.com/
- https://plainjs.com/javascript/plugins/ui/
- https://van11y.net/ (repos at e.g. https://github.com/nico3333fr/jquery-accessible-tabs-aria)