Pārlūkot izejas kodu

Fix aria-selected attribute

Jason Beggs 1 gadu atpakaļ
vecāks
revīzija
11e39455ab
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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')
         },
         },