Skip to content

Commit

Permalink
SEO changes, aria-labels for links
Browse files Browse the repository at this point in the history
  • Loading branch information
tutaru99 committed Jun 6, 2024
1 parent b7abc0b commit a300809
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions components/blocks/DocumentListBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const props = defineProps({
<div>
<NuxtLink
class="document-list__card-link"
aria-label="Link til download"
:to="
item.field_material_file
? item.field_material_file
Expand Down
6 changes: 5 additions & 1 deletion components/globals/navigation/TheOffCanvasMetaMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ const props = defineProps({
v-for="item in props.nestedItems"
:key="item"
>
<NuxtLink :to="item.url" class="meta-offcanvas__item-link">
<NuxtLink
:aria-label="'Link til ' + item.title"
:to="item.url"
class="meta-offcanvas__item-link"
>
{{ item.title }}
</NuxtLink>
</div>
Expand Down
10 changes: 9 additions & 1 deletion components/globals/navigation/TheOffCanvasMobileNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ onUnmounted(() => {
? node.link.url
: 'javascript:void(0)'
"
:aria-label="'Link til ' + node?.title"
>
{{ node.title }}
<span v-if="node.below.length > 0">
Expand All @@ -98,6 +99,7 @@ onUnmounted(() => {
class="offcanvas-mobile__item-link offcanvas-mobile__item-link--meta-menu"
@click="handleItemClick(metaItem)"
:to="metaItem.url"
:aria-label="'Link til ' + metaItem?.title"
>
{{ metaItem.title }}
<span v-if="metaItem.below.length > 0">
Expand All @@ -114,7 +116,11 @@ onUnmounted(() => {
v-if="showSubItems"
class="offcanvas-mobile__menu-wrapper--subitems"
>
<NuxtLink class="offcanvas-mobile__back-button" @click="goBack">
<NuxtLink
class="offcanvas-mobile__back-button"
@click="goBack"
aria-label="Tilbage"
>
<span class="offcanvas-movile__back-button--icon">
<NuxtIcon filled name="chevron-left" />
</span>
Expand All @@ -133,6 +139,7 @@ onUnmounted(() => {
v-if="subNode.url"
:to="subNode?.url"
class="offcanvas-mobile__item-link--subitems"
:aria-label="'Link til ' + subNode?.title"
>
{{ subNode?.title }}
</NuxtLink>
Expand All @@ -141,6 +148,7 @@ onUnmounted(() => {
v-else
:to="subNode?.link?.url"
class="offcanvas-mobile__item-link--subitems"
:aria-label="'Link til ' + subNode?.title"
>
{{ subNode?.title }}
</NuxtLink>
Expand Down
1 change: 1 addition & 0 deletions components/modals/TheModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ onUnmounted(() => {
class="button button--primary the-modal__button-cta"
:to="modalContent?.field_video_url?.url"
target="_blank"
aria-label="Link til video"
>
Se video
</NuxtLink>
Expand Down
2 changes: 1 addition & 1 deletion components/page-header/PageHeaderCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const cardItem = ref(props.cardItem);
{{ cardItem?.field_description }}
</div>
<div class="page-header-card__link" v-if="cardItem?.field_link.url">
<NuxtLink :to="cardItem?.field_link.url">
<NuxtLink :to="cardItem?.field_link.url" aria-label="Læs mere">
<NuxtIcon
class="page-header-card__link--icon"
name="arrow-right"
Expand Down
1 change: 1 addition & 0 deletions components/view-components/EducationalCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const determineIcon = (cardLink: string) => {
</div>
<div class="educational-materials__card-item-button">
<NuxtLink
aria-label="Link til download"
class="educational-materials__card-link"
:to="
card.field_material_file
Expand Down
6 changes: 5 additions & 1 deletion components/view-components/PracticalInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ const props = defineProps({
v-for="goals in item.content"
:key="goals"
>
<NuxtLink :to="goals?.field_link?.url" target="_blank">
<NuxtLink
:to="goals?.field_link?.url"
target="_blank"
aria-label="Link til SDG"
>
<img :src="goals?.field_logo?.src" alt="SDG" />
</NuxtLink>
</div>
Expand Down
12 changes: 9 additions & 3 deletions components/views/userView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,26 @@ const practicalInfoData = computed(() => {

<div class="user__links-wrapper">
<div>
<NuxtLink class="user__link" :to="'tel:' + data?.field_phone">{{
data?.field_phone
}}</NuxtLink>
<NuxtLink
aria-label="Call phone number"
class="user__link"
:to="'tel:' + data?.field_phone"
>{{ data?.field_phone }}</NuxtLink
>
</div>

<div>
<NuxtLink
class="user__link"
aria-label="Send email"
:href="'mailto:' + data?.field_mail"
>{{ data?.field_mail }}</NuxtLink
>
</div>

<div>
<NuxtLink
aria-label="Visit website"
class="user__link"
target="_blank"
:to="data?.field_homepage?.url"
Expand Down Expand Up @@ -216,6 +221,7 @@ const practicalInfoData = computed(() => {
? button?.field_file
: button?.field_link?.url
"
aria-label="Download link"
>
<span class="user__info-description--button-item__link-text">
{{ button?.field_link?.title }}
Expand Down

0 comments on commit a300809

Please sign in to comment.