Poprawki dostępności

This commit is contained in:
2022-09-23 22:58:23 +02:00
parent 95a027f284
commit a9b72d0b7a
3 changed files with 21 additions and 11 deletions
+4 -4
View File
@@ -2,7 +2,7 @@
<div class="filters-options" @keydown.esc="showOptions = false">
<div class="bg" v-if="showOptions" @click="showOptions = false"></div>
<button class="btn--image" @click="toggleShowOptions">
<button class="btn--image" @click="toggleShowOptions" ref="button">
<img :src="getIcon('filter2')" alt="Open filters" />
{{ $t('options.filters') }} [F]
</button>
@@ -125,9 +125,9 @@ export default defineComponent({
toggleShowOptions() {
this.showOptions = !this.showOptions;
// this.$nextTick(() => {
// if (this.showOptions) (this.$refs['initFocusedElement'] as any)?.focus();
// });
this.$nextTick(() => {
if (this.showOptions) (this.$refs['button'] as HTMLButtonElement)?.focus();
});
},
onSorterChange(item: { id: string | number; value: string }) {