diff --git a/.changeset/sixty-pens-confess.md b/.changeset/sixty-pens-confess.md
new file mode 100644
index 000000000..d255cb400
--- /dev/null
+++ b/.changeset/sixty-pens-confess.md
@@ -0,0 +1,5 @@
+---
+"bits-ui": patch
+---
+
+chore: Updated a11y warnings for better Svelte 5 compatibility
diff --git a/eslint.config.js b/eslint.config.js
index cf3a7aad5..cb7add7ac 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -2,4 +2,10 @@ import config, { DEFAULT_IGNORES } from "@huntabyte/eslint-config";
const ignores = ["**/extended-types"];
-export default config({ svelte: true, ignores: [...DEFAULT_IGNORES, ...ignores] });
+export default config({
+ svelte: true,
+ ignores: [...DEFAULT_IGNORES, ...ignores],
+}).override("huntabyte:svelte:rules", {
+ // we ignore as it complains about the changed warning names in Svelte 5
+ rules: { "svelte/no-unused-svelte-ignore": "off" },
+});
diff --git a/packages/bits-ui/src/lib/bits/button/components/button.svelte b/packages/bits-ui/src/lib/bits/button/components/button.svelte
index 94bbf1169..6c72ef9d6 100644
--- a/packages/bits-ui/src/lib/bits/button/components/button.svelte
+++ b/packages/bits-ui/src/lib/bits/button/components/button.svelte
@@ -14,7 +14,7 @@
{#if builders && builders.length}
-
+
{:else}
-
+
-
+
{#if asChild && $open}
{:else if transition && $open}
diff --git a/packages/bits-ui/src/lib/bits/combobox/components/combobox-item.svelte b/packages/bits-ui/src/lib/bits/combobox/components/combobox-item.svelte
index 7d8706e78..9b7940e5e 100644
--- a/packages/bits-ui/src/lib/bits/combobox/components/combobox-item.svelte
+++ b/packages/bits-ui/src/lib/bits/combobox/components/combobox-item.svelte
@@ -29,8 +29,7 @@
$: isSelected = $isSelectedStore(value);
-
-
+
{#if asChild}
{:else}
diff --git a/packages/bits-ui/src/lib/bits/dialog/components/dialog-overlay.svelte b/packages/bits-ui/src/lib/bits/dialog/components/dialog-overlay.svelte
index 2bc7aa7a0..0e23d657d 100644
--- a/packages/bits-ui/src/lib/bits/dialog/components/dialog-overlay.svelte
+++ b/packages/bits-ui/src/lib/bits/dialog/components/dialog-overlay.svelte
@@ -34,7 +34,7 @@
{#if asChild && $open}
{:else if transition && $open}
-
+
{:else if inTransition && outTransition && $open}
-
+
{:else if inTransition && $open}
-
+
{:else if outTransition && $open}
-
+
{:else if $open}
-
+
{/if}
diff --git a/packages/bits-ui/src/lib/bits/link-preview/components/link-preview-trigger.svelte b/packages/bits-ui/src/lib/bits/link-preview/components/link-preview-trigger.svelte
index 076dcfbc4..cc9245c40 100644
--- a/packages/bits-ui/src/lib/bits/link-preview/components/link-preview-trigger.svelte
+++ b/packages/bits-ui/src/lib/bits/link-preview/components/link-preview-trigger.svelte
@@ -30,8 +30,8 @@
{#if asChild}
{:else}
-
+
-
+
{/if}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-content.svelte b/packages/bits-ui/src/lib/bits/select/components/select-content.svelte
index 19ee888ed..bb076d81e 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-content.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-content.svelte
@@ -66,7 +66,7 @@
}
-
+
{#if asChild && $open}
{:else if transition && $open}
diff --git a/packages/bits-ui/src/lib/bits/select/components/select-item.svelte b/packages/bits-ui/src/lib/bits/select/components/select-item.svelte
index adba8942a..93230228b 100644
--- a/packages/bits-ui/src/lib/bits/select/components/select-item.svelte
+++ b/packages/bits-ui/src/lib/bits/select/components/select-item.svelte
@@ -27,7 +27,7 @@
$: isSelected = $isSelectedStore(value);
-
+
{#if asChild}
{:else}
diff --git a/packages/bits-ui/src/lib/bits/toolbar/components/toolbar-link.svelte b/packages/bits-ui/src/lib/bits/toolbar/components/toolbar-link.svelte
index 183bcccad..7dadc0942 100644
--- a/packages/bits-ui/src/lib/bits/toolbar/components/toolbar-link.svelte
+++ b/packages/bits-ui/src/lib/bits/toolbar/components/toolbar-link.svelte
@@ -25,15 +25,9 @@
{#if asChild}
{:else}
-
-
+
+
+
-
+
{/if}
diff --git a/packages/bits-ui/src/tests/alert-dialog/AlertDialogTest.svelte b/packages/bits-ui/src/tests/alert-dialog/AlertDialogTest.svelte
index 896136029..e29d6106b 100644
--- a/packages/bits-ui/src/tests/alert-dialog/AlertDialogTest.svelte
+++ b/packages/bits-ui/src/tests/alert-dialog/AlertDialogTest.svelte
@@ -30,5 +30,5 @@
{open}
-
+
diff --git a/packages/bits-ui/src/tests/combobox/ComboboxTest.svelte b/packages/bits-ui/src/tests/combobox/ComboboxTest.svelte
index 995543795..a3f0f2b72 100644
--- a/packages/bits-ui/src/tests/combobox/ComboboxTest.svelte
+++ b/packages/bits-ui/src/tests/combobox/ComboboxTest.svelte
@@ -38,7 +38,7 @@
-
+
- {#if !slot}
+ {#if !slotted}
Default:
{#if defaultVal}
{` ${defaultVal}`}
{:else}
- ——
+ ——
undefined
{/if}
diff --git a/sites/docs/src/lib/components/api-section.svelte b/sites/docs/src/lib/components/api-section.svelte
index ac4018b0d..1820d2b87 100644
--- a/sites/docs/src/lib/components/api-section.svelte
+++ b/sites/docs/src/lib/components/api-section.svelte
@@ -29,7 +29,7 @@
{/if}
{#if schema.slotProps}
-
+
{/if}
{#if schema.dataAttributes && schema.dataAttributes.length}
diff --git a/sites/docs/src/lib/components/component-preview.svelte b/sites/docs/src/lib/components/component-preview.svelte
index 8343349d1..4712733cc 100644
--- a/sites/docs/src/lib/components/component-preview.svelte
+++ b/sites/docs/src/lib/components/component-preview.svelte
@@ -43,7 +43,7 @@
class="absolute left-0 top-0 h-8 w-full rounded-[7px] bg-background dark:bg-muted"
in:send={{ key: "active" }}
out:receive={{ key: "active" }}
- />
+ >
{/if}
+ >
{/if}
diff --git a/sites/docs/src/lib/components/demos/calendar-demo.svelte b/sites/docs/src/lib/components/demos/calendar-demo.svelte
index 485d06c9b..177ead091 100644
--- a/sites/docs/src/lib/components/demos/calendar-demo.svelte
+++ b/sites/docs/src/lib/components/demos/calendar-demo.svelte
@@ -57,7 +57,7 @@
>
+ >
{date.day}
diff --git a/sites/docs/src/lib/components/demos/date-picker-demo.svelte b/sites/docs/src/lib/components/demos/date-picker-demo.svelte
index e09f1434a..699c3d67a 100644
--- a/sites/docs/src/lib/components/demos/date-picker-demo.svelte
+++ b/sites/docs/src/lib/components/demos/date-picker-demo.svelte
@@ -86,7 +86,7 @@
>
+ >
{date.day}
diff --git a/sites/docs/src/lib/components/demos/date-range-field-demo.svelte b/sites/docs/src/lib/components/demos/date-range-field-demo.svelte
index 1034dd819..807e4d1c0 100644
--- a/sites/docs/src/lib/components/demos/date-range-field-demo.svelte
+++ b/sites/docs/src/lib/components/demos/date-range-field-demo.svelte
@@ -38,7 +38,7 @@
{/if}
{/each}
- –
+ –
{#each segments.end as { part, value }}
{#if part === "literal"}
diff --git a/sites/docs/src/lib/components/demos/date-range-picker-demo.svelte b/sites/docs/src/lib/components/demos/date-range-picker-demo.svelte
index 67cd4084a..f8fdb67b4 100644
--- a/sites/docs/src/lib/components/demos/date-range-picker-demo.svelte
+++ b/sites/docs/src/lib/components/demos/date-range-picker-demo.svelte
@@ -36,7 +36,7 @@
{/if}
{/each}
- –
+ –
{#each segments.end as { part, value }}
{#if part === "literal"}
@@ -114,7 +114,7 @@
>
+ >
{date.day}
diff --git a/sites/docs/src/lib/components/demos/popover-demo.svelte b/sites/docs/src/lib/components/demos/popover-demo.svelte
index 1d3c96c43..322beb431 100644
--- a/sites/docs/src/lib/components/demos/popover-demo.svelte
+++ b/sites/docs/src/lib/components/demos/popover-demo.svelte
@@ -33,8 +33,9 @@
Width
-
WW
Height
- HH
+ >
diff --git a/sites/docs/src/lib/components/demos/range-calendar-demo.svelte b/sites/docs/src/lib/components/demos/range-calendar-demo.svelte
index 17ed1c705..6aee101e9 100644
--- a/sites/docs/src/lib/components/demos/range-calendar-demo.svelte
+++ b/sites/docs/src/lib/components/demos/range-calendar-demo.svelte
@@ -55,7 +55,7 @@
>
+ >
{date.day}
diff --git a/sites/docs/src/lib/components/icons/switch-off.svelte b/sites/docs/src/lib/components/icons/switch-off.svelte
index 38c9ae3d0..2bf314821 100644
--- a/sites/docs/src/lib/components/icons/switch-off.svelte
+++ b/sites/docs/src/lib/components/icons/switch-off.svelte
@@ -3,5 +3,5 @@
>
+ >
diff --git a/sites/docs/src/lib/components/icons/switch-on.svelte b/sites/docs/src/lib/components/icons/switch-on.svelte
index 8540aef97..334ff7a89 100644
--- a/sites/docs/src/lib/components/icons/switch-on.svelte
+++ b/sites/docs/src/lib/components/icons/switch-on.svelte
@@ -3,5 +3,5 @@
>
+ >