Complete keyboard navigation and focus style enhancement

This commit is contained in:
Bubka
2022-09-30 14:00:22 +02:00
parent 41387453d5
commit 1610cf3738
7 changed files with 26 additions and 27 deletions

View File

@ -47,7 +47,7 @@
methods: {
setCheckbox(event) {
if (this.$attrs.disabled == false) {
if (this.$attrs['disabled'] == undefined) {
this.form[this.fieldName] = !this.form[this.fieldName]
this.$emit(this.fieldName, this.form[this.fieldName])
}

View File

@ -14,7 +14,7 @@
</div>
<div v-if="this.showcloseButton" class="fullscreen-footer">
<!-- Close button -->
<button class="button is-dark is-rounded" @click.stop="closeModal">
<button ref="closeModalButton" class="button is-dark is-rounded" @click.stop="closeModal">
{{ $t('commons.close') }}
</button>
</div>

View File

@ -133,6 +133,7 @@
else this.$router.push({ name: 'genericError', params: { err: this.$t('errors.not_a_supported_otp_type') } });
this.$parent.isActive = true
this.$parent.$refs.closeModalButton.focus()
}
catch(error) {
this.clearOTP()

View File

@ -5,7 +5,7 @@
<div class="tabs is-centered is-fullwidth">
<ul>
<li v-for="tab in tabs" :key="tab.view" :class="{ 'is-active': tab.view === activeTab }">
<a :id="tab.id" tabindex="0" @click="selectTab(tab.view)">{{ tab.name }}</a>
<router-link :id="tab.id" :to="{ name: tab.view }">{{ tab.name }}</router-link>
</li>
</ul>
</div>
@ -52,12 +52,6 @@
default: ''
},
},
methods: {
selectTab(viewName) {
this.$router.push({ name: viewName })
},
}
}
</script>