diff --git a/.changeset/warm-pillows-sip.md b/.changeset/warm-pillows-sip.md new file mode 100644 index 000000000..27dc5d5ef --- /dev/null +++ b/.changeset/warm-pillows-sip.md @@ -0,0 +1,5 @@ +--- +"bits-ui": patch +--- + +fix: add role="option" to select items diff --git a/packages/bits-ui/src/lib/bits/select/select.svelte.ts b/packages/bits-ui/src/lib/bits/select/select.svelte.ts index dd171d23d..562f40fc8 100644 --- a/packages/bits-ui/src/lib/bits/select/select.svelte.ts +++ b/packages/bits-ui/src/lib/bits/select/select.svelte.ts @@ -890,6 +890,7 @@ class SelectItemState { () => ({ id: this.#id.current, + role: "option", "aria-selected": this.root.includesItem(this.value.current) ? "true" : undefined, "data-value": this.value.current, "data-disabled": getDataDisabled(this.disabled.current),