thecodejack / svelte-file-dropzone

Svelte component for fileupload
https://svelte-file-dropzone.netlify.app/
252 stars 45 forks source link

A11y: noninteractive element cannot have positive tabIndex value #115

Closed lapoguidi closed 9 months ago

lapoguidi commented 1 year ago

Hello, thanks for your component. I'm trying to use it in a my hobbist Sveltekit project and I receive the notification written in subject every time a page contains your component. I know that's just a warning, but I simply report it to you.

This is the complete warning shown:

[vite-plugin-svelte] ./node_modules/.pnpm/svelte-file-dropzone@1.0.0/node_modules/svelte-file-dropzone/src/components/Dropzone.svelte:310:0
A11y: noninteractive element cannot have positive tabIndex value

I tried changing index="0" with index="-1" at the row indicated and it seems to remove the warning and for the tests I done it doesn't impact on the functionalities, anyway I'm not an experienced programmer, and for sure I didn't tested all the methods of your component.

Thanks for your attention. Have a nice day.

Sincerely, Lapo

codeho commented 1 year ago

yes, this will pop up as a warning. Also there is no reason to have a tabindex attribute there, as a dropzone is not applicaple to a screen-reader anyways. It would be nice to be removed to clear the warnings.

arackaf commented 9 months ago

This should be fixed in 2.0.3