Skip to content

Commit 836d434

Browse files
committed
fix: color contrast error by axe-core
1 parent a286c36 commit 836d434

File tree

9 files changed

+13
-9
lines changed

9 files changed

+13
-9
lines changed

src/.vuepress/theme/components/BackTo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<RouterLink
3-
class="inline-flex"
3+
class="inline-flex px-4 my-4 text-color bg-main"
44
:to="to"
55
>
66
<vp-icon

src/.vuepress/theme/components/Logo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<RouterLink
33
:to="$localePath"
4-
class="inline-flex p-3 pt-2"
4+
class="inline-flex p-3 pt-2 logo bg-main"
55
>
66
<img
77
src="/vue-a11y-logo.svg"

src/.vuepress/theme/components/TheHeader.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ export default {
130130
&-logo--bg {
131131
@media (min-width: theme('screens.lg')) {
132132
@apply bg-page-gradient-left;
133+
134+
.logo {
135+
@apply bg-primary;
136+
}
133137
}
134138
}
135139

src/.vuepress/theme/components/TheNavigation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<a
1717
:href="href"
1818
:aria-current="isActive && $route.path.indexOf(item.link) === 0 ? 'page' : null"
19-
class="px-3 py-3 border-b-4 border-transparent border-solid the-nav-link hover:border-accent-primary"
19+
class="relative z-0 px-3 py-3 border-b-4 border-transparent border-solid the-nav-link bg-main hover:border-accent-primary"
2020
:class="{ 'active border-accent-primary': isActive && $route.path.indexOf(item.link) === 0 }"
2121
@click="navigate"
2222
>
@@ -26,7 +26,7 @@
2626
</li>
2727
<li>
2828
<ExternalLink
29-
class="px-3 py-3 border-b-4 border-transparent border-solid the-nav-link hover:border-accent-primary"
29+
class="relative z-0 px-3 py-3 border-b-4 border-transparent border-solid the-nav-link bg-main hover:border-accent-primary"
3030
:href="`https://github.com/${$themeConfig.repo}`"
3131
label="Github"
3232
/>

src/.vuepress/theme/components/TheSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<template v-for="(nav, index) in items">
2121
<span
2222
:key="`nav-heading-${index}`"
23-
class="mt-12 ml-4 text-xl font-bold"
23+
class="mt-12 ml-4 text-xl font-bold bg-primary"
2424
>{{ nav.title }}</span>
2525
<ul
2626
:key="`nav-list-${index}`"

src/.vuepress/theme/layouts/Post.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
:content="$themeConfig.url + post.path"
1717
>
1818
<BackTo
19-
class="inline-flex px-4 my-4 -ml-4"
19+
class="py-2 -ml-4"
2020
:text="`${$themeLocaleConfig.backToText} posts`"
2121
:to="`${$localePath}posts/`"
2222
/>

src/.vuepress/theme/layouts/Posts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
v-show="isCategory"
99
:text="`${$themeLocaleConfig.backToText} posts`"
1010
:to="`${$localePath}posts/`"
11-
class="inline-flex px-4 my-4 ml-2"
11+
class="ml-2"
1212
/>
1313

1414
<ul class="flex flex-wrap justify-between w-full px-3 lg:pr-6 lg:pl-0 lg:ml-6 xl:pr-0">

src/.vuepress/theme/styles/_a11y.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
[tabindex]:not([tabindex="-1"]), a, button, input, select, textarea {
1818
position: relative;
19-
z-index: 2;
2019
outline: 2px solid transparent;
2120
outline-offset: 6px;
2221
transition: outline-offset .1s ease;
2322
}
2423

2524
*:focus {
25+
z-index: 2 !important;
2626
outline-color: var(--color);
2727
outline-offset: 3px;
2828
}

src/.vuepress/theme/views/Settings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="container z-10 mx-auto post-page">
33
<div class="px-6 mt-6 xl:px-4">
44
<BackTo
5-
class="inline-flex px-4 my-4 -ml-4"
5+
class="py-2 -ml-4"
66
:to="$localePath"
77
:text="`${$themeLocaleConfig.backToText} home`"
88
/>

0 commit comments

Comments
 (0)