Skip to content

Commit

Permalink
fix(NcAppSIdebarTabs): fix a11y, focusable navigation, Home End hotkeys
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii Shartsev <grigorii.shartsev@nextcloud.com>
  • Loading branch information
ShGKme committed Mar 28, 2023
1 parent 32beb5d commit f9bc507
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/NcAppSidebar/NcAppSidebarTabs.vue
Expand Up @@ -33,6 +33,8 @@
@keydown.left.exact.prevent="focusPreviousTab"
@keydown.right.exact.prevent="focusNextTab"
@keydown.tab.exact.prevent="focusActiveTabContent"
@keydown.home.exact.prevent="focusFirstTab"
@keydown.end.exact.prevent="focusLastTab"
@keydown.33.exact.prevent="focusFirstTab"
@keydown.34.exact.prevent="focusLastTab">
<ul>
Expand All @@ -43,7 +45,7 @@
:class="{ active: activeTab === tab.id }"
:data-id="tab.id"
:href="`#tab-${tab.id}`"
:tabindex="activeTab === tab.id ? undefined : -1"
:tabindex="activeTab === tab.id ? 0 : -1"
role="tab"
@click.prevent="setActive(tab.id)">
<span class="app-sidebar-tabs__tab-icon">
Expand Down

0 comments on commit f9bc507

Please sign in to comment.