konsta
konsta copied to clipboard
A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
Check that this is really a bug
- [X] I confirm
Reproduction link
.
Bug description
On compilation, your components on Svelte receiving:
A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
It's because: Changelog from Svelte, November 2022:
New accessibility warnings, a11y-click-events-have-key-events and a11y-no-noninteractive-tabindex, will now warn when your components lack required key events or tabindex. While a11y-role-has-required-aria-props will no longer warn when elements match their semantic role (3.51.0)
Expected Behavior
No response
Actual Behavior
No response
Konsta UI version
1.02
Platform/Target and Browser Versions
windows, chrome dev 108.0.5359.10 (official) (64-bit)
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- [X] Make sure this is a Konsta UI issue and not a framework-specific issue
Would you like to open a PR for this bug?
- [ ] I'm willing to open a PR
I had that same issue with F7 and solved it by creating a .vscode folder with a settings.json file for :
{
"svelte.plugin.svelte.compilerWarnings": {
"a11y-click-events-have-key-events": "ignore"
}
}
Just in case that might help :)