Skip to content
Snippets Groups Projects
Commit cf8d1f58 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

use top menu in accessibility link

parent 3020b0ff
No related branches found
No related tags found
No related merge requests found
......@@ -27,32 +27,13 @@
<template v-slot:append>
<a class="accessibility_link" href="#main_content">Gå videre til hovedinnholdet</a>
<a href= "#menu_title"
class="accessibility_link"
@click="menuDialog=true"
:aria-label="$t('menu.title')"
aria-haspopup="true"
:aria-expanded="menuDialog"
<a href="#top_menu" class="accessibility_link"
@click="$store.commit('toggle', 'menuOpen')"
aria-label="Hopp til toppmeny"
>
Åpne hovedmeny</a>
<v-dialog v-model="menuDialog">
<v-toolbar dense dark color="primary">
<v-toolbar-title id="menu_title">{{$t('menu.title')}}</v-toolbar-title><v-spacer></v-spacer>
<v-toolbar-items><v-divider vertical/>
<v-btn
@click="menuDialog=false"
dark
text
>{{$t("close")}}
<v-icon right>close</v-icon>
</v-btn>
</v-toolbar-items>
</v-toolbar>
<Menu @close="menuDialog=false"/>
</v-dialog>
<v-menu allowOverflow: true offsetY>
<template v-slot:activator="{ on, attrs }">
......@@ -123,9 +104,11 @@ import Menu from './Menu.vue'
select(item) {
if (item) {
this.items = []
this.suggesting = false
this.suggesting = false
console.log("ITEM", item)
console.log("INFLECTED", this.inflected_suggestions)
this.submit(item)
this.submit(item)
}
}
......
......@@ -37,7 +37,7 @@
</v-toolbar-items>
<v-btn width="96px" v-if="$route.name != 'about'" aria-labelledby="menu_label" text @click.native="menuOpen = !menuOpen">
<v-btn id="top_menu" width="96px" v-if="$route.name != 'about'" aria-labelledby="menu_label" text @click.native="menuOpen = !menuOpen">
<span id="menu_label">{{$t('menu.title')}}</span><v-icon right>{{menuOpen? 'close' : 'menu'}}</v-icon></v-btn>
<v-divider vertical/>
......@@ -62,10 +62,19 @@ export default {
return {
version_label: process.env.VUE_APP_VERSION_LABEL,
release: process.env.VUE_APP_RELEASE,
menuOpen: false,
settingsMenu: false
}
},
computed: {
menuOpen: {
get() {
return this.$store.state.menuOpen
},
set () {
this.$store.commit('toggle', 'menuOpen')
}
}
},
methods: {
toggleAbout: function() {
this.$route.name=='about'? this.$router.back(): this.$router.push('/om')
......
......@@ -27,7 +27,8 @@ const store = new Vuex.Store({
showHGNO: null,
showInflectionNo: null,
currentLocale: null,
collapseArticles: null
collapseArticles: null,
menuOpen: false
},
mutations: {
initStore(state) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment