From b3ed5188c0e379db29a4cb3bf4e1ceeaa0d09318 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Thu, 22 Aug 2024 13:20:00 +0200 Subject: [PATCH] use setAttribute() for setting the aria-label see: https://github.com/dropzone/dropzone/pull/1972#issuecomment-2304302848 --- src/dropzone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dropzone.js b/src/dropzone.js index 55b233e28..d8111f45a 100644 --- a/src/dropzone.js +++ b/src/dropzone.js @@ -234,7 +234,7 @@ export default class Dropzone extends Emitter { // Making sure that no one can "tab" into this field. this.hiddenFileInput.setAttribute("tabindex", "-1"); // Add arialabel for a11y - this.hiddenFileInput.ariaLabel = "dropzone hidden input"; + this.hiddenFileInput.setAttribute("aria-label", "dropzone hidden input"); // Not setting `display="none"` because some browsers don't accept clicks // on elements that aren't displayed.