2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-04 06:32:23 +03:00

Merge pull request #607 from beattyml1/master

Added combobox, listbox, and option roles, Closes #606
This commit is contained in:
Jeff Sagal
2018-08-02 21:20:47 -07:00
committed by GitHub
+4 -2
View File
@@ -355,6 +355,8 @@
:tabindex="tabindex"
:readonly="!searchable"
:id="inputId"
role="combobox"
:aria-expanded="dropdownOpen"
aria-label="Search for option"
>
@@ -377,8 +379,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) }}