Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294472

Deprecate jQuery UI datepicker

$
0
0

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

jQueryUI is going to be deprecated
As part of this deprecation, the jQueryUI datepicker is among the components that need to be removed/replaced.
As mentioned in the parent issue: #3067261: [Plan] Remove jQuery UI components used by Drupal core and replace with a set of supported solutions
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:

Remaining tasks

Get PM signoff on the approach
Patch review
Release manager review
Subsystem maintainer review
Accessibility review

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 removed. Browsers that support native datepickers are unaffected, browsers that don't will provide text inputs to enter dates. More information can be found in the change record.


Viewing all articles
Browse latest Browse all 294472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>