Skip to content

Commit 678871c

Browse files
authored
fix(menu): remove "tabindex=-1" from MenuOption and Indicators (#349)
See #329
1 parent 073d1cb commit 678871c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/Indicators.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ defineExpose({ containerRef, clearButtonRef, dropdownButtonRef });
3535
ref="clearButton"
3636
type="button"
3737
class="clear-button"
38-
tabindex="-1"
3938
:disabled="isDisabled"
4039
@click.stop="emit('clear')"
4140
>
@@ -54,7 +53,6 @@ defineExpose({ containerRef, clearButtonRef, dropdownButtonRef });
5453
type="button"
5554
class="dropdown-icon"
5655
:class="{ active: isMenuOpen }"
57-
tabindex="-1"
5856
:disabled="isDisabled"
5957
@click.stop="emit('toggle')"
6058
>
@@ -97,10 +95,14 @@ defineExpose({ containerRef, clearButtonRef, dropdownButtonRef });
9795
height: var(--vs-indicator-icon-size);
9896
color: var(--vs-indicator-icon-color);
9997
background: none;
100-
outline: none;
10198
cursor: var(--vs-indicator-icon-cursor);
10299
}
103100
101+
.clear-button:focus-visible {
102+
border-radius: var(--vs-border-radius);
103+
outline: var(--vs-outline-width) solid var(--vs-outline-color);
104+
}
105+
104106
.dropdown-icon {
105107
appearance: none;
106108
display: inline-block;
@@ -116,6 +118,11 @@ defineExpose({ containerRef, clearButtonRef, dropdownButtonRef });
116118
transition: var(--vs-indicator-dropdown-icon-transition);
117119
}
118120
121+
.dropdown-icon:focus-visible {
122+
border-radius: var(--vs-border-radius);
123+
outline: var(--vs-outline-width) solid var(--vs-outline-color);
124+
}
125+
119126
.dropdown-icon.active {
120127
transform: rotate(180deg);
121128
}

src/MenuOption.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ watch(
5555
ref="option"
5656
class="menu-option"
5757
:class="{ focused: isFocused, selected: isSelected, disabled: isDisabled }"
58-
tabindex="-1"
5958
role="option"
6059
:aria-disabled="isDisabled"
6160
:aria-selected="isSelected"

0 commit comments

Comments
 (0)