-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
bugSomething isn't workingSomething isn't workinginvestigatingNot quite sure if it's valid, yetNot quite sure if it's valid, yet
Description
Describe the bug
When building with Vite, there are A11y warnings.
transforming (546) ../node_modules/svelte-range-slider-pips/dist/svelte/index.jsInternalCompileWarning {
name: 'CompileWarning',
code: 'a11y_no_static_element_interactions',
message: '`<span>` with a pointerdown or pointerup handler must have an ARIA role\n' +
'https://svelte.dev/e/a11y_no_static_element_interactions',
filename: 'node_modules/svelte-range-slider-pips/dist/svelte/components/RangePips.svelte',
position: [ 2124, 2892 ],
start: { line: 78, column: 4, character: 2124 },
end: { line: 100, column: 11, character: 2892 },
frame: '76: >\n' +
'77: {#if (all && first !== false) || first}\n' +
'78: <span\n' +
' ^\n' +
'79: class="rsPip rsPip--first"\n' +
'80: class:rsSelected={isSelected(min, values, precision)}'
}
Link To Reproduce
This is a compile-time error and not a runtime error.
The following repo reproduces the warning.
https://github.com/trevlar/repo-a11y-build-warnings-svelte-range-slider-pips
Versions
- svelte: v5.42.2
- svelte-range-slider-pips: v4.1.0
Steps to reproduce the behavior:
- Create a Vite + Svelte 5 project
- Install
svelte-range-slider-pipsv4.1.0 - Import and use the RangeSlider component with
pipsenabled - Run
vite build(orvite dev) - See A11y warnings in console output
Expected behavior
No errors when building.
Screenshots
Device/Environment
I am using FoundryVTT with Svelte as a UI layer.
- OS: macOS
- Node: node-v24.13.0
- Vite: vite/7.1.12
- Build tool: Vite with @sveltejs/vite-plugin-svelte
Additional context
This appears to be related to Svelte 5's stricter A11y linting. The <span> elements in RangePips.svelte have on:pointerdown/on:pointerup handlers but lack ARIA roles. A fix would involve adding appropriate roles (e.g., role="button") to the interactive span elements at lines 78, 107, and 135.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginvestigatingNot quite sure if it's valid, yetNot quite sure if it's valid, yet