add aria-label

This commit is contained in:
daria 2026-03-31 12:10:13 +03:00
parent da82950c8e
commit 23ea19b97c
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701
2 changed files with 8 additions and 1 deletions

View File

@ -139,6 +139,8 @@ define(req, function(AppConfig, Default, Language) {
// text & number were missing from the existing list
// "form_input_ph_email": "email@example.com",
// "form_input_ph_url": "https://example.com",
Messages.form_date_time = "Select date and time";
return Messages;
});

View File

@ -2114,13 +2114,18 @@ define([
get: function (opts, a, n, evOnChange) {
opts = Util.clone(TYPES.date.defaultOpts);
var tag = h('input');
var tag = h('input', {'aria-label': Messages.form_date_time});
var picker = Flatpickr(tag, {
disableMobile: true,
enableTime: true,
time_24hr: is24h,
dateFormat: dateFormat,
onChange: function(date) {
if (date) {
$(tag).attr('aria-label', date);
}
}
});
var $tag = $(tag);