Hi there,
I am trying to improve the accessibiliy of the Kendo UI Upload. My biggest problem right now is that the "headerStatusUploaded" always says "Done", even if the upload failed. The failure is just communicated by the exclamation mark. See picture attached.
To me "Done" sounds like everything went fine. This is especially bad for accessibility because the exclamation mark is not read by screen readers, but I also find it irritating as a not disabled user.
Best, Max
5 Answers, 1 is accepted
Hello Maximilian,
You can change the headerStatusUploaded message as you wish through the localization.headerStatusUploaded configuration:
localization: {
headerStatusUploaded: "enter your messages here."
}
Let me know if that would resolve the issue. Looking forward to your reply.
Regards,
Martin
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hello Martin,
thanks for the answer.This would solve my problem, if I could set the headerStatusUploaded at runtime. But that isn't possible, or is it?
Otherwise it would just display the new message regardless of the outcome of the upload.
Best, Max
Hello Max,
You could change the message if there are any validation files for a file in the select event. Please refer to the below code snippet:
select: function(e) {
var files = e.files;
for (var i = 0; i < files.length; i += 1) {
var file = e.files[i];
if (file.validationErrors) {
setTimeout(function() {
var headerStatusSpan = $('.k-upload-status.k-upload-status-total');
var contents = headerStatusSpan.contents();
contents[1].textContent = 'Custom text on validation error';
}, 0);
}
}
}
Here you will find a small Dojo example for reference.
Let me know if that works for you.
Regards,
Martin
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Thanks, Martin! That works for me.
Can you maybe explain, why to use setTimeout there?