Skip to content

Commit f9bc507

Browse files
committed
fix(NcAppSIdebarTabs): fix a11y, focusable navigation, Home End hotkeys
Signed-off-by: Grigorii Shartsev <grigorii.shartsev@nextcloud.com>
1 parent 32beb5d commit f9bc507

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/NcAppSidebar/NcAppSidebarTabs.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
@keydown.left.exact.prevent="focusPreviousTab"
3434
@keydown.right.exact.prevent="focusNextTab"
3535
@keydown.tab.exact.prevent="focusActiveTabContent"
36+
@keydown.home.exact.prevent="focusFirstTab"
37+
@keydown.end.exact.prevent="focusLastTab"
3638
@keydown.33.exact.prevent="focusFirstTab"
3739
@keydown.34.exact.prevent="focusLastTab">
3840
<ul>
@@ -43,7 +45,7 @@
4345
:class="{ active: activeTab === tab.id }"
4446
:data-id="tab.id"
4547
:href="`#tab-${tab.id}`"
46-
:tabindex="activeTab === tab.id ? undefined : -1"
48+
:tabindex="activeTab === tab.id ? 0 : -1"
4749
role="tab"
4850
@click.prevent="setActive(tab.id)">
4951
<span class="app-sidebar-tabs__tab-icon">

0 commit comments

Comments
 (0)