Skip to content

Commit

Permalink
fix(a11y): Fix heading hierarchy in some places
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Feb 2, 2024
1 parent f47d336 commit 0face99
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/Faces/FaceCover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
</div>
<div class="face-cover__details">
<div v-if="!baseName.match(/^[0-9]+$/)" class="face-cover__details__first-line">
<h2 class="face-cover__details__name">
<span class="face-cover__details__name">
{{ baseName }}
</h2>
</span>
</div>
<div v-if="!small" class="face-cover__details__second-line">
{{ n('photos', '%n photos', '%n photos', face.props['nbItems']) }}
Expand Down
6 changes: 5 additions & 1 deletion src/mixins/FaceCover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
&__name {
flex-grow: 1;
margin: 0;
font-weight: bold;
font-size: 20px;
line-height: 30px;
color: var(--color-main-text);
}
}
}
Expand All @@ -87,4 +91,4 @@
height: 60px !important;
--photos-face-width: 60px !important;
}
}
}
8 changes: 6 additions & 2 deletions src/views/Albums.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
:link="`/albums/${collection.basename}`"
:alt-img="t('photos', 'Cover photo for album {albumName}', { albumName: collection.basename })"
:cover-url="collection.lastPhoto | coverUrl">
<h2 class="album__name">
<span class="album__name">
{{ collection.basename }}
</h2>
</span>

<div slot="subtitle" class="album__details">
{{ collection.date }} ⸱ {{ n('photos', '%n item', '%n photos and videos', collection.nbItems,) }}
Expand Down Expand Up @@ -160,6 +160,10 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 20px;
margin-bottom: 12px;
line-height: 30px;
color: var(--color-main-text);
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/views/Places.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
:link="`/places/${collection.basename}`"
:alt-img="t('photos', 'Cover photo for place {placeName}', { placeName: collection.basename })"
:cover-url="collection.lastPhoto | coverUrl">
<h2 class="place__name">
<span class="place__name">
{{ collection.basename }}
</h2>
</span>

<div slot="subtitle" class="place__details">
{{ n('photos', '%n item', '%n photos and videos', collection.nbItems,) }}
Expand Down Expand Up @@ -127,6 +127,10 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 20px;
margin-bottom: 12px;
line-height: 30px;
color: var(--color-main-text);
}
}
</style>
8 changes: 6 additions & 2 deletions src/views/SharedAlbums.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
:alt-img="t('photos', 'Cover photo for shared album {albumName}.', { albumName: collection.basename })"
:data-test="collection.basename"
:cover-url="collection.lastPhoto | coverUrl">
<h2 class="album__name">
<span class="album__name">
{{ collection | albumOriginalName }}
</h2>
</span>

<div slot="subtitle" class="album__details">
{{ collection.date }} ⸱ {{ n('photos', '%n item', '%n photos and videos', collection.nbItems,) }}
Expand Down Expand Up @@ -140,6 +140,10 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 20px;
margin-bottom: 12px;
line-height: 30px;
color: var(--color-main-text);
}
}
</style>

0 comments on commit 0face99

Please sign in to comment.