Skip to content

Commit

Permalink
fix(a11y): h1 on Home
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Nov 19, 2024
1 parent 577b4d6 commit 14f377f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/page/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script setup lang="ts">
import { computed } from "vue";
import { useRoute } from "vue-router";
import MinkLogo from "@/page/MinkLogo.vue";
import { getLogoutUrl } from "@/auth/sbAuth";
import { useAuth } from "@/auth/auth.composable";
Expand All @@ -13,18 +15,21 @@ defineProps<{
}>();
const { isAuthenticating, payload, canUserWrite } = useAuth();
const route = useRoute();
const isHome = computed(() => route.path == "/");
</script>

<template>
<header
class="mb-2 shadow bg-white text-gray-600 dark:bg-zinc-800 dark:text-zinc-200"
>
<div class="container py-4 flex justify-between flex-wrap gap-4">
<div class="text-4xl">
<component :is="isHome ? 'h1' : 'div'" class="text-4xl">
<router-link to="/" class="text-current">
<MinkLogo :large="large" />
</router-link>
</div>
</component>

<div class="flex items-center gap-4">
<SpinIndicator v-if="isAuthenticating" />
Expand Down

0 comments on commit 14f377f

Please sign in to comment.