filepond icon indicating copy to clipboard operation
filepond copied to clipboard

[Bug] Accessibility issue, drop label is aria-hidden but focusable

Open Tofandel opened this issue 2 years ago • 5 comments
trafficstars

Is there an existing issue for this?

  • [X] I have searched the existing issues

Have you updated FilePond and its plugins?

  • [X] I have updated FilePond and its plugins

Describe the bug

image

Reproduction

Simply use filepond and run lighthouse on the page, you will see that the drop-label is aria-hidden="true" but the only focusable element within the filepond is the drop label which has tabindex="0"

I could see in the comment of the lib that it's because the reader will read the label of the input, but the input is not focusable

Aria hidden should be removed from the drop label

Environment

Doesn't matter

Tofandel avatar Jul 12 '23 17:07 Tofandel

Any update for this issue?

kbhutiya-eab avatar May 29 '24 17:05 kbhutiya-eab

This is still an issue. But the fix from @errijahi seems not merged?

quangthien27 avatar Jun 12 '24 04:06 quangthien27

Yes, this fix is not merged.

errijahi avatar Jun 12 '24 07:06 errijahi

@errijahi Is this issue looking to be merged in at some point?

uariguzo-eab avatar Jun 24 '24 13:06 uariguzo-eab

The author and maintainer of the lib is @rikschennink not the author of the closed PR

Tofandel avatar Jun 24 '24 13:06 Tofandel

Until and if the maintainer merges, here is the work around. In your oninit callback add the following code:

let ele = document.querySelector(".filepond--drop-label label:first-child");
ele.removeAttribute("aria-hidden");

I think that the requested fix is probably not correct place to treat the issue and why @rikschennink has not merged. If I'm to guess he was trying to hide the drop zone not the link to add a file from the browser.

ZaxyxaZ avatar Aug 12 '24 15:08 ZaxyxaZ

Thanks @ZaxyxaZ, fixed in 4.31.2

rikschennink avatar Aug 12 '24 16:08 rikschennink