Hi, using Svelte 4 the build emits some warnings due to new A11y roles introduced.
node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte
(!) Plugin svelte: A11y: with click, keypress handlers must have an ARIA role
1149: <span
1186: <span
(!) Plugin svelte: A11y:
with dragstart, dragover, dragleave, drop handlers must have an ARIA role
1136: <div
(!) Plugin svelte: A11y:
with click, keypress handlers must have an ARIA role
1203: <div
1243: <div
I forgot to mention that at the time I found a way to silent these warnings:
in the rollup configuration file:
import path from 'path';
[...]
plugins: [
svelte({
// other stuff
// Warnings are normally passed straight to Rollup. You can optionally handle them here, for example to squelch warnings with a particular code
onwarn: (warning, handler) => {
// do not emit warnings for 3rd-party package `simple-svelte-autocomplete`
// looking to a file that ends with /SimpleAutocomplete.svelte (using unix & windows path separator)
if (warning.filename?.endsWith(`${path.sep}SimpleAutocomplete.svelte`)) {
return;
}
// let Rollup handle all other warnings normally
handler && handler(warning);
},
})
],
PS. if you are using Vite the separator it looks like could be hardcoded to *nix "/"
Hi, using Svelte 4 the build emits some warnings due to new A11y roles introduced. node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte
(!) Plugin svelte: A11y: with click, keypress handlers must have an ARIA role 1149: <span 1186: <span
(!) Plugin svelte: A11y:
(!) Plugin svelte: A11y:
I forgot to mention that at the time I found a way to silent these warnings: in the rollup configuration file:
PS. if you are using Vite the separator it looks like could be hardcoded to *nix "/"