Skip to content

Commit

Permalink
Merge pull request #3881 from AllanOXDi/keyboard_navigation
Browse files Browse the repository at this point in the history
fixed focus on navigation through the navigation drawer
  • Loading branch information
bjester authored Dec 16, 2022
2 parents 6745a78 + a06a2bd commit 2ca7157
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ body {
max-width: 200px;
text-align: center;
}

.button:focus-visible,
.v-btn:focus-visible {
outline: 2px solid var(--v-secondary-base) !important;
}
}

/* RTL-related rules */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
:right="$isRTL"
>
<VToolbar color="primary" dark>
<VBtn flat icon @click="drawer = false">
<VBtn flat icon :tabindex="handleclickTab" @click="drawer = false">
<Icon>clear</Icon>
</VBtn>
<VToolbarTitle class="notranslate">
Kolibri Studio
</VToolbarTitle>
</VToolbar>
<VList>
<VListTile :href="channelsLink">
<VListTile :href="channelsLink" :tabindex="handleclickTab">
<VListTileAction>
<Icon>home</Icon>
</VListTileAction>
<VListTileContent class="subheading">
<VListTileTitle>{{ $tr('channelsLink') }}</VListTileTitle>
</VListTileContent>
</VListTile>
<VListTile v-if="user.is_admin" :href="administrationLink">
<VListTile v-if="user.is_admin" :href="administrationLink" :tabindex="handleclickTab">
<VListTileAction>
<Icon>people</Icon>
</VListTileAction>
Expand All @@ -34,7 +34,7 @@
</VListTileContent>

</VListTile>
<VListTile :href="settingsLink" @click="trackClick('Settings')">
<VListTile :href="settingsLink" :tabindex="handleclickTab" @click="trackClick('Settings')">
<VListTileAction>
<Icon>settings</Icon>
</VListTileAction>
Expand All @@ -50,7 +50,12 @@
<VListTileTitle v-text="$tr('changeLanguage')" />
</VListTileContent>
</VListTile>
<VListTile :href="helpLink" target="_blank" @click="trackClick('Help')">
<VListTile
:href="helpLink"
:tabindex="handleclickTab"
target="_blank"
@click="trackClick('Help')"
>
<VListTileAction>
<Icon>open_in_new</Icon>
</VListTileAction>
Expand All @@ -73,12 +78,14 @@
:text="$tr('copyright', { year: new Date().getFullYear() })"
href="https://learningequality.org/"
target="_blank"
:tabindex="handleclickTab"
/>
<p class="mt-4">
<ActionLink
href="https://community.learningequality.org/c/support/studio"
target="_blank"
:text="$tr('giveFeedback')"
:tabindex="handleclickTab"
/>
</p>
</VContainer>
Expand Down Expand Up @@ -123,6 +130,13 @@
...mapState({
user: state => state.session.currentUser,
}),
handleclickTab() {
if (this.value) {
return 0;
} else {
return -1;
}
},
drawer: {
get() {
return this.value;
Expand Down

0 comments on commit 2ca7157

Please sign in to comment.