Skip to content

Commit dae547d

Browse files
authored
Merge pull request #725 from craftcms/a11y/more-color-stuff
Keyboard navigation enhancements
2 parents 57eefb6 + ed221eb commit dae547d

File tree

7 files changed

+19
-4
lines changed

7 files changed

+19
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The pages served from `docs/` are treated like any other VuePress project, and t
2929
## Local Development
3030

3131
```
32+
nvm use
3233
npm install
3334
npm run docs:dev
3435
```

docs/.vuepress/components/See.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export default {
8888
}
8989
9090
.see-description {
91-
@apply text-sm text-gray-500 mt-1;
91+
@apply text-sm mt-1;
92+
color: var(--text-color-muted);
9293
}
9394
</style>

docs/.vuepress/theme/components/ColorModeSwitch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
height: 22px;
2323
2424
&:focus {
25-
@apply outline-none;
25+
outline: var(--custom-focus-outline);
2626
}
2727
2828
.knob {

docs/.vuepress/theme/components/DocSetPanel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
.doc-set-link {
7575
@apply block px-4 mt-2 font-medium text-lg;
7676
color: var(--doc-set-color);
77+
outline-offset: -2px;
7778
7879
.title {
7980
color: var(--doc-set-color);
@@ -82,7 +83,6 @@
8283
8384
.home {
8485
@apply text-sm relative;
85-
color: #718096;
8686
8787
.back {
8888
@apply inline-block absolute mr-1 opacity-100;

docs/.vuepress/theme/components/LeftBar.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@
8181
/* browser height - approx. .doc-set-panel - #top height - #bottom height */
8282
height: calc(100vh - 93px - 3rem - 3rem);
8383
}
84+
85+
.sidebar-links {
86+
a:focus {
87+
outline-offset: -2px;
88+
}
89+
}
8490
}
8591
8692
.sidebar-transitioning {

docs/.vuepress/theme/components/PageFooter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
}
8484
8585
&:focus {
86-
@apply outline-none;
86+
outline: var(--custom-focus-outline);
8787
}
8888
8989
&:hover {

docs/.vuepress/theme/styles/base.pcss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
--custom-block-bg-color: theme("colors.softer");
2424
--custom-block-border-color: theme("colors.soft");
2525
--craft-red: #e5422b;
26+
--custom-focus-outline: 2px solid var(--link-color-default);
2627

2728
/* Code */
2829
--code-color-default: #476582;
@@ -105,3 +106,9 @@ img {
105106
font-size: 108%;
106107
}
107108
}
109+
110+
.sidebar-links {
111+
a {
112+
outline-offset: -2px;
113+
}
114+
}

0 commit comments

Comments
 (0)