Accessibility Changes (#53)
* Semantic HTML: Cards are now articles. * Semantic HTML: Changed aside to header. * Changed some references from aside to header. * Added aria-label to left and right buttons. * Added aria-hidden to catergory icons. * Added aria-label to the logo. * Added aria-hidden on more icons. * Added aria-hidden to some icons.
This commit is contained in:
parent
7ac56b1a0c
commit
aea0cec061
@ -1,59 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="categories">
|
<div class="categories">
|
||||||
<p v-if="categories.includes('fabric')">
|
<p v-if="categories.includes('fabric')">
|
||||||
<FabricLoader />
|
<FabricLoader aria-hidden="true" />
|
||||||
Fabric
|
Fabric
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('forge')">
|
<p v-if="categories.includes('forge')">
|
||||||
<ForgeLoader />
|
<ForgeLoader aria-hidden="true" />
|
||||||
Forge
|
Forge
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('technology')">
|
<p v-if="categories.includes('technology')">
|
||||||
<TechCategory />
|
<TechCategory aria-hidden="true" />
|
||||||
Technology
|
Technology
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('adventure')">
|
<p v-if="categories.includes('adventure')">
|
||||||
<AdventureCategory />
|
<AdventureCategory aria-hidden="true" />
|
||||||
Adventure
|
Adventure
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('magic')">
|
<p v-if="categories.includes('magic')">
|
||||||
<MagicCategory />
|
<MagicCategory aria-hidden="true" />
|
||||||
Magic
|
Magic
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('utility')">
|
<p v-if="categories.includes('utility')">
|
||||||
<UtilityCategory />
|
<UtilityCategory aria-hidden="true" />
|
||||||
Utility
|
Utility
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('decoration')">
|
<p v-if="categories.includes('decoration')">
|
||||||
<DecorationCategory />
|
<DecorationCategory aria-hidden="true" />
|
||||||
Decoration
|
Decoration
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('library')">
|
<p v-if="categories.includes('library')">
|
||||||
<LibraryCategory />
|
<LibraryCategory aria-hidden="true" />
|
||||||
Library
|
Library
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('cursed')">
|
<p v-if="categories.includes('cursed')">
|
||||||
<CursedCategory />
|
<CursedCategory aria-hidden="true" />
|
||||||
Cursed
|
Cursed
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('worldgen')">
|
<p v-if="categories.includes('worldgen')">
|
||||||
<WorldGenCategory />
|
<WorldGenCategory aria-hidden="true" />
|
||||||
Worldgen
|
Worldgen
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('storage')">
|
<p v-if="categories.includes('storage')">
|
||||||
<StorageCategory />
|
<StorageCategory aria-hidden="true" />
|
||||||
Storage
|
Storage
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('food')">
|
<p v-if="categories.includes('food')">
|
||||||
<FoodCategory />
|
<FoodCategory aria-hidden="true" />
|
||||||
Food
|
Food
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('equipment')">
|
<p v-if="categories.includes('equipment')">
|
||||||
<EquipmentCategory />
|
<EquipmentCategory aria-hidden="true" />
|
||||||
Equipment
|
Equipment
|
||||||
</p>
|
</p>
|
||||||
<p v-if="categories.includes('misc')">
|
<p v-if="categories.includes('misc')">
|
||||||
<MiscCategory />
|
<MiscCategory aria-hidden="true" />
|
||||||
Misc
|
Misc
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
:class="{ disabled: currentPage === 1 }"
|
:class="{ disabled: currentPage === 1 }"
|
||||||
class="paginate has-icon"
|
class="paginate has-icon"
|
||||||
@click="currentPage !== 1 ? switchPage(currentPage - 1) : null"
|
@click="currentPage !== 1 ? switchPage(currentPage - 1) : null"
|
||||||
|
aria-label="Previous Page"
|
||||||
>
|
>
|
||||||
<LeftArrowIcon />
|
<LeftArrowIcon />
|
||||||
</button>
|
</button>
|
||||||
@ -34,6 +35,7 @@
|
|||||||
? switchPage(currentPage + 1)
|
? switchPage(currentPage + 1)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
|
aria-label="Next Page"
|
||||||
>
|
>
|
||||||
<RightArrowIcon />
|
<RightArrowIcon />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="project-card">
|
<article class="project-card">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img
|
<img
|
||||||
:src="iconUrl ? iconUrl : 'https://cdn.modrinth.com/placeholder.svg'"
|
:src="iconUrl ? iconUrl : 'https://cdn.modrinth.com/placeholder.svg'"
|
||||||
@ -43,14 +43,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<DownloadIcon />
|
<DownloadIcon aria-hidden="true" />
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<h4>Downloads</h4>
|
<h4>Downloads</h4>
|
||||||
<p class="value">{{ formatNumber(downloads) }}</p>
|
<p class="value">{{ formatNumber(downloads) }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<CalendarIcon />
|
<CalendarIcon aria-hidden="true" />
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<h4>Created</h4>
|
<h4>Created</h4>
|
||||||
<p
|
<p
|
||||||
@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<EditIcon />
|
<EditIcon aria-hidden="true" />
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<h4>Updated</h4>
|
<h4>Updated</h4>
|
||||||
<p
|
<p
|
||||||
@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="latestVersion" class="stat">
|
<div v-if="latestVersion" class="stat">
|
||||||
<TagIcon />
|
<TagIcon aria-hidden="true" />
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<h4>Available For</h4>
|
<h4>Available For</h4>
|
||||||
<p class="value">
|
<p class="value">
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<div v-if="editMode" class="buttons">
|
<div v-if="editMode" class="buttons">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<aside>
|
<header>
|
||||||
<section class="navbar columns">
|
<section class="navbar columns">
|
||||||
<section class="logo column">
|
<section class="logo column">
|
||||||
<NuxtLink to="/">
|
<NuxtLink to="/">
|
||||||
<ModrinthLogo v-if="$colorMode.value === 'light'" />
|
<ModrinthLogo
|
||||||
<ModrinthLogoWhite v-else />
|
v-if="$colorMode.value === 'light'"
|
||||||
|
aria-label="modrinth"
|
||||||
|
/>
|
||||||
|
<ModrinthLogoWhite v-else aria-label="modrinth" />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<span class="badge yellow">Beta</span>
|
<span class="badge yellow">Beta</span>
|
||||||
</section>
|
</section>
|
||||||
@ -81,7 +84,7 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<section class="auth-prompt">
|
<section class="auth-prompt">
|
||||||
<a :href="authUrl" class="log-in-button"
|
<a :href="authUrl" class="log-in-button"
|
||||||
><GitHubIcon />Sign In with GitHub</a
|
><GitHubIcon aria-hidden="true" />Sign In with GitHub</a
|
||||||
>
|
>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@ -144,7 +147,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
</section>
|
</section>
|
||||||
</aside>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<notifications group="main" position="bottom right" />
|
<notifications group="main" position="bottom right" />
|
||||||
<!--<notifications
|
<!--<notifications
|
||||||
@ -264,7 +267,7 @@ export default {
|
|||||||
display: block;
|
display: block;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
||||||
aside {
|
header {
|
||||||
height: var(--size-navbar-height);
|
height: var(--size-navbar-height);
|
||||||
background-color: var(--color-raised-bg);
|
background-color: var(--color-raised-bg);
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
@ -464,7 +467,7 @@ export default {
|
|||||||
|
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
.layout {
|
.layout {
|
||||||
aside {
|
header {
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
@ -481,7 +484,7 @@ export default {
|
|||||||
|
|
||||||
@media (min-width: 1280px) {
|
@media (min-width: 1280px) {
|
||||||
.layout {
|
.layout {
|
||||||
aside {
|
header {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user