Skip to content

Commit 84a3b5b

Browse files
committed
Update link and body colors to have a contrast ratio of 7:1 (WCAG AAA compliant), resolves #1233
1 parent 3438451 commit 84a3b5b

File tree

5 files changed

+19
-14
lines changed

5 files changed

+19
-14
lines changed

app/components/stats-value.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
.label {
1515
grid-column: 1;
1616
grid-row: 2;
17-
color: #76838a;
17+
color: light-dark(#545454, #adc0cd);
1818
font-size: var(--space-s);
1919
font-weight: normal;
2020
line-height: 1.6;
@@ -27,5 +27,5 @@
2727
height: var(--space-l-xl);
2828
margin-left: var(--space-s);
2929
margin-top: var(--space-3xs);
30-
color: #76838a;
30+
color: light-dark(#545454, #adc0cd);
3131
}

app/styles/application.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
"Courier New", monospace;
3939

4040
--main-color: light-dark(#383838, #f9f7ec);
41-
--main-color-light: light-dark(#858585, #a6a6a6);
41+
--main-color-light: light-dark(#585858, #a6a6a6);
4242
--main-shadow-color: light-dark(var(--green900), hsl(111, 10%, 8%));
4343
--main-bg: light-dark(#f9f7ec, hsl(0, 1%, 19%));
4444
--main-bg-dark: light-dark(#edebdd, #141413);
4545
--gray-border: light-dark(#d5d3cb, #666561);
46-
--link-color: rgb(0, 172, 91);
47-
--link-hover-color: #007940;
46+
--link-color: light-dark(#006133, #04da75);
47+
--link-hover-color: light-dark(#01391f, #00f27f);
4848

4949
--placeholder-bg: hsl(212, 7%, 57%);
5050
--placeholder-bg2: hsl(213, 16%, 75%);

app/styles/categories.module.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515

1616
> * {
1717
padding: var(--space-s);
18+
display: block;
19+
}
20+
21+
> *:hover {
22+
background-color: var(--main-bg);
1823
}
1924

2025
> * + * {
@@ -32,4 +37,8 @@
3237
margin: var(--space-2xs) 0;
3338
text-align: center;
3439
font-size: 85%;
40+
41+
> a {
42+
text-decoration: underline;
43+
}
3544
}

app/templates/categories.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121

2222
<div local-class="list">
2323
{{#each this.model as |category|}}
24-
<div local-class='row' data-test-category={{category.slug}}>
24+
<LinkTo @route="category" @model={{category.slug}} data-test-category={{category.slug}} local-class='row'>
2525
<div>
26-
<LinkTo @route="category" @model={{category.slug}} local-class="category-link">
26+
<span>
2727
{{~category.category~}}
28-
</LinkTo>
28+
</span>
2929
<span class="text--small" data-test-crate-count>
3030
{{format-num category.crates_cnt}} {{if (eq category.crates_cnt 1) "crate" "crates"}}
3131
</span>
3232
</div>
3333
<div local-class="description" class="text--small">
3434
{{ category.description }}
3535
</div>
36-
</div>
36+
</LinkTo>
3737
{{/each}}
3838
</div>
3939

tests/axe-config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
export default {
2-
rules: {
3-
'color-contrast': {
4-
enabled: false,
5-
},
6-
},
2+
rules: {},
73
};

0 commit comments

Comments
 (0)