Fixed #4500 - Theme updates: change :focus to focus-visible

This commit is contained in:
Tuğçe Küçükoğlu 2023-09-25 16:24:10 +03:00
parent 045820d0fa
commit f40b8fb178
51 changed files with 1672 additions and 1669 deletions

View file

@ -62,7 +62,8 @@ export default {
data() {
return {
name: this.$attrs.name,
focusedOptionIndex: -1
focusedOptionIndex: -1,
isFocusVisibleItem: true
};
},
watch: {
@ -85,6 +86,7 @@ export default {
onOptionClick(event, value) {
if (!this.readonly && !this.disabled) {
this.onOptionSelect(event, value);
this.isFocusVisibleItem = false;
const firstFocusableEl = DomHandler.getFirstFocusableElement(event.currentTarget);
firstFocusableEl && DomHandler.focus(firstFocusableEl);
@ -100,6 +102,7 @@ export default {
},
onChange(event, value) {
this.onOptionSelect(event, value);
this.isFocusVisibleItem = true;
},
onOptionSelect(event, value) {
this.focusedOptionIndex = value;