Skip to content

Commit c20db4b

Browse files
committed
fix(navbar): make tabs tab/enter targets
1 parent 2909875 commit c20db4b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/common/navbar/NavbarComponent.vue

+7
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ const onTouchEnd = (e: TouchEvent) => {
212212
<template v-for="_route in visibleRoutes" :key="_route">
213213
<NTab
214214
class="tab"
215+
tabindex="0"
215216
:style="
216217
_route === activeRoute
217218
? { '--n-tab-text-color-hover': 'var(--navbar-text-color-hover-active)' }
@@ -220,6 +221,7 @@ const onTouchEnd = (e: TouchEvent) => {
220221
:name="_route.toLowerCase()"
221222
type="segment"
222223
@click="navigate(_route)"
224+
@keydown.enter="navigate(_route)"
223225
>
224226
<NFlex
225227
align="center"
@@ -384,6 +386,11 @@ nav {
384386
--n-font-weight-strong: normal;
385387
386388
padding: 0 0.75rem;
389+
outline: none;
390+
391+
&:focus-visible {
392+
color: var(--n-tab-text-color-hover);
393+
}
387394
}
388395
}
389396
}

0 commit comments

Comments
 (0)