Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event. #1517

Closed
cloudlena opened this issue Oct 11, 2022 · 1 comment · Fixed by #1522

Comments

@cloudlena
Copy link

cloudlena commented Oct 11, 2022

Since vite-plugin-svelte@1.0.6, there is a new a11y check: https://github.com/sveltejs/vite-plugin-svelte/releases/tag/%40sveltejs%2Fvite-plugin-svelte%401.0.6

This renders a lot of warnings in projects with carbon-components-svelte:

...
9:44:26 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/TextArea/TextArea.svelte:62:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
9:44:26 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/TextInput/TextInput.svelte:103:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
9:44:26 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/TextInput/PasswordInput.svelte:97:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
9:44:27 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/Tile/SelectableTile.svelte:56:0 A11y: not interactive element cannot have positive tabIndex value
9:44:27 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/TimePicker/TimePicker.svelte:55:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
9:44:27 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/Tooltip/Tooltip.svelte:252:6 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
9:44:27 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/UIShell/SideNav.svelte:58:2 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
9:44:28 AM [vite-plugin-svelte] ...my-project/node_modules/carbon-components-svelte/src/TreeView/TreeViewNodeList.svelte:135:6 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.

Another warning that started to pop up from a11y is not interactive element cannot have positive tabIndex value (see example above).

@metonym
Copy link
Collaborator

metonym commented Oct 14, 2022

Fixed in v0.70.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants