Skip to content

Commit cfa36a5

Browse files
authored
⚒️ Resolves lighthouse issue (#398)
* Updates dependencies * Fixes tap target to resolve lighthouse * Merge conflicts
1 parent 9e7aa03 commit cfa36a5

File tree

4 files changed

+5367
-6162
lines changed

4 files changed

+5367
-6162
lines changed

11ty/_includes/components/definition-content.njk

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{% macro renderAltWords(words, labels) %}
22
{%- if words | isArray -%}
33
{# Array #}
4-
<ul
5-
class="list-semicolon"
6-
{% if labels %}aria-labelledby="{{ labels | join(' ') }}"{% endif %}
7-
>
4+
<ul class="list-semicolon" {% if labels %} aria-labelledby="{{ labels | join(' ') }}" {% endif %}>
85
{%- for word in words -%}
96
<li>
107
{{ word | linkIfExistsInCollection(collections.definedWords) | safe }}
@@ -15,8 +12,7 @@
1512
{# Object #}
1613
{# With class="", the list loses padding via the CSS reset style. #}
1714
{# For multi-level category support, we may want an actual class. #}
18-
<ul class="">
19-
{%- for category, list in words -%}
15+
<ul class=""> {%- for category, list in words -%}
2016
<li>
2117
{% set categoryId = ("alt-words-" + category) | replace(' ', '-') %}
2218
<strong id="{{ categoryId }}">{{ category }}</strong>
@@ -26,7 +22,6 @@
2622
</ul>
2723
{%- endif -%}
2824
{% endmacro %}
29-
3025
<section class="definition-content">
3126
<section class="definition-content__content">
3227
{{ content | safe }}
@@ -40,13 +35,13 @@
4035
{%- if reading -%}
4136
<section class="definition-content__content">
4237
<h2 id="further-reading">Further Reading</h2>
43-
<ul class="list-semicolon" aria-labelledby="further-reading">
38+
<ul class="list-no-bullets" aria-labelledby="further-reading">
4439
{% for link in reading %}
4540
<li>
46-
<a href="{{link.href}}">{{ link.text }}</a>
41+
<a href="{{ link.href }}">{{ link.text }}</a>
4742
</li>
4843
{% endfor %}
4944
</ul>
5045
</section>
5146
{% endif %}
52-
</section>
47+
</section>

assets/css/components/_lists.scss

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
ol, dl {
1+
ol,
2+
dl {
23
margin: 0;
34
padding: 0 0 0 1em;
45
}
@@ -25,18 +26,10 @@ dt {
2526
font-weight: $bold;
2627
}
2728

28-
.list-semicolon {
29+
.list-no-bullets {
2930
list-style: none;
3031
margin: 0;
3132
padding: 0;
32-
33-
& > li {
34-
display: inline;
35-
36-
&:not(:last-child)::after {
37-
content: '; ';
38-
}
39-
}
4033
}
4134

4235
.list-default {

lighthouserc.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module.exports = {
22
ci: {
33
upload: {
4-
target: 'temporary-public-storage',
4+
target: 'temporary-public-storage'
55
},
66
assert: {
7-
preset: "lighthouse:no-pwa",
7+
preset: 'lighthouse:no-pwa',
88
assertions: {
9-
"font-display": "off",
10-
"uses-rel-preconnect": "off",
11-
"render-blocking-resources": "off",
12-
"uses-long-cache-ttl": "off"
9+
'font-display': 'off',
10+
'uses-rel-preconnect': 'off',
11+
'render-blocking-resources': 'off',
12+
'uses-long-cache-ttl': 'off'
1313
}
1414
}
15-
},
15+
}
1616
};

0 commit comments

Comments
 (0)