Pass aria-labelledby to the correct component in sliders

This commit is contained in:
daylily
2025-04-03 02:34:03 -04:00
parent 5a51339bfe
commit 932ba0b259
@@ -7,6 +7,7 @@
value = $bindable(),
orientation = 'horizontal',
class: className,
'aria-labelledby': ariaLabelledby,
...restProps
}: WithoutChildrenOrChild<SliderPrimitive.RootProps> = $props()
</script>
@@ -38,6 +39,7 @@ get along, so we shut typescript up by casting `value` to `never`.
<SliderPrimitive.Thumb
index={thumb}
class="border-primary bg-background ring-offset-background focus-visible:ring-ring block size-5 rounded-full border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
aria-labelledby={ariaLabelledby}
/>
{/each}
{/snippet}