2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-19 09:50:33 +03:00

fix: add aria-activedescendant only when there is one (#1137)

This commit is contained in:
Jeff Sagal
2020-03-26 16:51:53 -07:00
committed by GitHub
parent 87a7b18e2a
commit 11306321a2
2 changed files with 38 additions and 1 deletions
+3 -1
View File
@@ -1039,11 +1039,13 @@
'aria-autocomplete': 'list',
'aria-labelledby': `vs${this.uid}__combobox`,
'aria-controls': `vs${this.uid}__listbox`,
'aria-activedescendant': this.typeAheadPointer > -1 ? `vs${this.uid}__option-${this.typeAheadPointer}` : '',
'ref': 'search',
'type': 'search',
'autocomplete': this.autocomplete,
'value': this.search,
...(this.dropdownOpen && this.filteredOptions[this.typeAheadPointer] ? {
'aria-activedescendant': `vs${this.uid}__option-${this.typeAheadPointer}`
} : {}),
},
events: {
'compositionstart': () => this.isComposing = true,