Skip to content

Commit

Permalink
fix: add role="option" to select items (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardsimonse authored Nov 2, 2024
1 parent aa34669 commit 2a4b525
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-pillows-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": patch
---

fix: add role="option" to select items
1 change: 1 addition & 0 deletions packages/bits-ui/src/lib/bits/select/select.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2a4b525

Please sign in to comment.