Skip to content

Commit

Permalink
Add aria-label to VFilterTab
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound committed May 27, 2024
1 parent ed6c2a6 commit 3265d2a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions frontend/src/components/VHeader/VHeaderMobile/VFilterTab.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<template>
<VTab id="filters" size="medium" class="gap-x-2">
<VTab id="filters" size="medium" class="gap-x-2" :aria-label="ariaLabel">
<VFilterIconOrCounter :applied-filter-count="appliedFilterCount" />
<h2 class="label-regular">{{ $t("filters.title") }}</h2>
</VTab>
</template>
<script lang="ts">
import { computed, defineComponent } from "vue"
import { useI18n } from "~/composables/use-i18n"
import VFilterIconOrCounter from "~/components/VHeader/VFilterIconOrCounter.vue"
import VTab from "~/components/VTabs/VTab.vue"
export default {
export default defineComponent({
name: "VFilterTab",
components: { VFilterIconOrCounter, VTab },
props: {
Expand All @@ -17,5 +21,12 @@ export default {
default: 0,
},
},
}
setup(props) {
const i18n = useI18n()
const ariaLabel = computed(() =>
i18n.tc("header.filterButton.withCount", props.appliedFilterCount)
)
return { ariaLabel }
},
})
</script>

0 comments on commit 3265d2a

Please sign in to comment.