Browse Source

Fix aria-selected attribute

Jason Beggs 1 năm trước cách đây
mục cha
commit
11e39455ab
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/ui/src/combobox.js

+ 1 - 1
packages/ui/src/combobox.js

@@ -439,7 +439,7 @@ function handleOption(el, Alpine) {
 
         // Only the active element should have aria-selected="true"...
         'x-effect'() {
-            this.$comboboxOption.isActive
+            this.$comboboxOption.isSelected
                 ? el.setAttribute('aria-selected', true)
                 : el.removeAttribute('aria-selected')
         },