浏览代码

Fix aria-selected attribute

Jason Beggs 1 年之前
父节点
当前提交
11e39455ab
共有 1 个文件被更改,包括 1 次插入1 次删除
  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"...
         // Only the active element should have aria-selected="true"...
         'x-effect'() {
         'x-effect'() {
-            this.$comboboxOption.isActive
+            this.$comboboxOption.isSelected
                 ? el.setAttribute('aria-selected', true)
                 ? el.setAttribute('aria-selected', true)
                 : el.removeAttribute('aria-selected')
                 : el.removeAttribute('aria-selected')
         },
         },