Closed noosxe closed 1 year ago
Thank you for this contribution, but are you sure that treating all keypresses equally is the right thing to do here? I think people generally expect mouse clicks to be equivalent to pressing only Enter and/or Space
@aabounegm thanks for your comment.
I dug a little bit deeper and decided to just prevent the compiler from throwing the errors for these cases.
There is no point in adding keyboard event handlers at all because the elements can't be navigated to using a keyboard anyway. The "real" accessibility is handled by elements that are wrapped by the ones that were throwing warnings in case of the autocomplete-option and file-dropzone. In case of modal clicking on the backdrop to hide the modal is useful but doing the same with the keyboard is not because keyboard users can instantly jump to the close button itself.
Docs available on https://illright.github.io/attractions/369/
Svelte compiler complains about non-interactive elements with on:click handlers not having a keyboard alternative for a11y purposes.
This change adds missing event handlers.