Deprecate and remove jQuery UI datepicker

Created on 6 August 2019, over 5 years ago
Updated 12 September 2023, over 1 year ago

Read this to mitigate potential confusion that may occur when reading through this issue: Starting with comment #6 until probably #34, the discussion largely surrounds attempting to use this issue to also address accessibility issues with native datepickers. Over the course of these comments we were able to conclude that it's an important thing to do but out of scope for this issue. The biggest takeaway from that chunk of comments is there are no datepicker/libraries that are sufficiently accessible, particularly when compared to jQueryUI.

Problem/Motivation


As part of this deprecation, the jQueryUI datepicker is among the components that need to be removed/replaced.
see: #3090244: Deprecate jQuery UI datepicker in Drupal 8 β†’
As mentioned in the parent issue: 🌱 [Plan] Remove jQuery UI components used by Drupal core and replace with a set of supported solutions Fixed
The OpenJS Foundation 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

How datepickers currently work in Drupal core: When a native datepicker is available, jQueryUI's datepicker is not used. After taking into account supported browsers, this means
1%-5% of Drupal users use jQuery UI's datepicker. The majority of users will not experience any changes to their datepicker experience.

Proposed resolution

Remove datepicker support entirely for browsers that do not support native datepickers (again, this is 1%-5% of users) and replace the fields with text inputs that have additional instructional text describing the date/time format that should be used.

This approach is preferred over finding a new datepicker library polyfill because there are no options available that do not result in significantly diminished accessibility. Introducing a replacement datepicker would result in broken screenreader and/or keyboard navigation (depending on the browser being used). A text field for entering the date, on the other hand, can be made accessible quite easily.

drupal.locale.datepicker will also be deprecated as it exists only to extend the jQueryUI datepicker.

This is what the change will look like in IE11, one of the browsers supported by Drupal that does not have a native datepicker:

And this shows the visual differences between e.g. Chrome (with native datepicker) and Safari (without native datepicker):

Remaining tasks

(#43)

(#46)
(#57 + #64)
(#76)
Post follow up issues for further investigation into accessibility improvements for date inputs

User interface changes

No more datepicker for the ~5% percentage of supported browsers that don't provide native datepickers.

API changes

...

Data model changes

N/A

Release notes snippet

Due to jQuery UI's end of life, the jQueryUI Datepicker has been deprecated. Browsers that support native datepickers are unaffected; browsers that do not will instead provide text inputs to enter dates. More information can be found in the change record on Datepicker β†’ .

πŸ“Œ Task
Status

Fixed

Version

8.8 ⚰️

Component
JavascriptΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024