2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

Added the combobox, listbox, and option roles to the input, ul, and li items respectively per W3C spec, Closes #606

This commit is contained in:
Matthew Beatty
2018-08-01 13:04:08 -04:00
parent a0c8efe0e5
commit d00b567428
+3 -2
View File
@@ -355,6 +355,7 @@
:tabindex="tabindex"
:readonly="!searchable"
:id="inputId"
role="combobox"
aria-label="Search for option"
>
@@ -377,8 +378,8 @@
</div>
<transition :name="transition">
<ul ref="dropdownMenu" v-if="dropdownOpen" class="dropdown-menu" :style="{ 'max-height': maxHeight }">
<li v-for="(option, index) in filteredOptions" v-bind:key="index" :class="{ active: isOptionSelected(option), highlight: index === typeAheadPointer }" @mouseover="typeAheadPointer = index">
<ul ref="dropdownMenu" v-if="dropdownOpen" class="dropdown-menu" :style="{ 'max-height': maxHeight }" role="listbox">
<li role="option" v-for="(option, index) in filteredOptions" v-bind:key="index" :class="{ active: isOptionSelected(option), highlight: index === typeAheadPointer }" @mouseover="typeAheadPointer = index">
<a @mousedown.prevent="select(option)">
<slot name="option" v-bind="(typeof option === 'object')?option:{[label]: option}">
{{ getOptionLabel(option) }}