Skip to content

Commit 9f17a26

Browse files
authored
A11Y-Improvements (#394)
- standardized focus-indicators - reworked expander-arrow so that it won't read out by screenreaders - hide `<br>` for screenreader - hide `<hr>` for screenreader - updated aria-label for search-input - updated aria-label for updateDate - add aria-label for related countries - add lang-tag for footer-love
1 parent add1dd9 commit 9f17a26

27 files changed

+153
-93
lines changed

assets/sass/_variables.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ html {
3232
--border-radius-s: 0.4rem;
3333
--border-radius-m: 0.8rem;
3434
--border-radius-l: 1.6rem;
35-
--pagefind-ui-border-radius: var(--border-radius-l);
36-
--pagefind-ui-border: #000;
35+
--pagefind-ui-border-radius: var(--border-radius-l) !important;
36+
--pagefind-ui-border: #000 !important;
3737
--box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.25);
3838
--box-shadow-light: 0.4rem 0.4rem 0.4rem rgba(0, 0, 0, 0.1);
3939
--highlight-color-tip: #c4f2ff;
4040
--highlight-color-inofficial: #f0f3f5;
4141
--highlight-color-important: #ffe3d9;
4242
--border: 0.1rem solid transparent;
4343
--pagefind-ui-font: roboto, Arial, Helvetica, sans-serif;
44+
--outline-focus-indicator: #257fa8;
4445
}
4546

4647
html[data-theme="dark"] {
@@ -64,4 +65,5 @@ html[data-theme="dark"] {
6465
--highlight-color-inofficial: #2a2d30;
6566
--highlight-color-important: #4a2a1a;
6667
--border: 0.1rem solid #3d444d;
68+
--outline-focus-indicator: #2e9acb;
6769
}

assets/sass/anchorlink.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@
5353
color: var(--link-default);
5454
border: none;
5555
background-color: transparent;
56-
transition: all 0.3s ease;
56+
transition:
57+
background-color 0.3s ease,
58+
opacity 0.3s ease;
5759

5860
&:hover,
5961
&:focus {
6062
background-color: var(--bg-neutral);
6163
opacity: 1;
6264
}
6365

66+
@include focus-indicator(0.2rem);
67+
6468
@media print {
6569
display: none;
6670
}

assets/sass/button.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
display: inline-flex;
44
align-items: center;
55
gap: 0.4rem;
6-
border: 2px solid var(--link-default);
6+
border: 0.2rem solid var(--link-default);
77
border-radius: var(--border-radius-m);
88
font-size: 1.5rem;
99
cursor: pointer;
@@ -18,4 +18,6 @@
1818
&:focus {
1919
background: rgba($link-hovered, 0.15);
2020
}
21+
22+
@include focus-indicator(0.2rem);
2123
}

assets/sass/contentNavigation.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
margin-bottom: 0;
2424
}
2525
}
26+
27+
li {
28+
margin-bottom: 0.3rem;
29+
}
2630
}
2731

2832
.o-aside__header {
@@ -34,6 +38,9 @@
3438
display: flex;
3539
align-items: flex-start;
3640
gap: 0.4rem;
41+
width: fit-content;
42+
43+
@include focus-indicator(0.1rem);
3744
}
3845

3946
.o-aside__backlink-text {

assets/sass/dropdown.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
&:hover,
1717
&:focus {
1818
color: var(--link-hovered);
19-
transition: all 0.3s ease;
19+
transition: color 0.3s ease;
2020

2121
& > :not(.material-symbols-rounded) {
2222
text-decoration: underline;

assets/sass/expander.scss

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
gap: 0.5rem;
99
align-items: center;
1010
transition: background 0.3s ease;
11+
justify-content: space-between;
12+
border-radius: var(--border-radius-m);
1113

1214
&:not(.o-expander__summary--booking) {
1315
font-weight: 700;
@@ -19,10 +21,11 @@
1921
text-decoration: underline;
2022
}
2123

22-
border-radius: var(--border-radius-m);
2324
background: rgba($link-hovered, 0.15);
2425
}
2526

27+
@include focus-indicator(0.2rem);
28+
2629
&--booking {
2730
&:hover,
2831
&:focus {
@@ -53,7 +56,6 @@ details {
5356
background-color: var(--bg-neutral);
5457
border-radius: var(--border-radius-m);
5558
margin-bottom: 1.2rem;
56-
border: var(--border);
5759

5860
table {
5961
width: 100%;
@@ -65,10 +67,6 @@ details > summary {
6567
list-style-type: none;
6668
}
6769

68-
.details-screen > .o-expander__summary {
69-
padding-right: 3.2rem;
70-
}
71-
7270
details > div {
7371
overflow-x: auto;
7472
}
@@ -77,19 +75,18 @@ details > summary::-webkit-details-marker {
7775
display: none;
7876
}
7977

80-
.details-screen > .o-expander__summary::before {
81-
content: "keyboard_arrow_down";
82-
position: absolute;
83-
right: 1.2rem;
84-
font-size: 2.4rem;
85-
align-self: center;
86-
@extend .material-symbols-rounded;
78+
.o-expander__summary > span {
79+
transition: transform 0.2s;
80+
}
81+
82+
.o-expander__summary > div {
83+
display: flex;
84+
align-items: center;
85+
gap: 0.5rem;
8786
}
8887

89-
.details-screen[open] > .o-expander__summary::before {
90-
content: "keyboard_arrow_up";
91-
font-size: 2.4rem;
92-
@extend .material-symbols-rounded;
88+
.details-screen[open] > .o-expander__summary > span {
89+
transform: rotate(180deg);
9390
}
9491

9592
details[open] > .o-expander__summary:not(.o-expander__summary--booking) {

assets/sass/form.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
@media (min-width: #{$breakpoint-md}) {
2929
width: 50%;
3030
}
31+
32+
@include focus-indicator(0.2rem);
3133
}
3234
}
3335

assets/sass/interactiveMap.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@
6767
align-items: center;
6868
justify-content: center;
6969
font-size: 3rem;
70-
transition: all 0.2s ease;
70+
transition: background-color 0.2s ease;
7171

72-
&:hover {
72+
&:hover,
73+
&:focus {
7374
background-color: var(--link-hovered);
7475
}
76+
77+
@include focus-indicator(0.2rem);
7578
}
7679

7780
&__legend {

assets/sass/navigation.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ menu > li > menu {
194194
align-items: center;
195195
white-space: nowrap;
196196
line-height: 1;
197+
border-radius: var(--border-radius-m);
197198

198199
&:hover,
199200
&:focus {

assets/sass/search.scss

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
border: var(--border);
1717
box-shadow: var(--box-shadow);
1818

19-
&:focus {
20-
outline: 0.2rem solid orange;
21-
outline-offset: 0.1rem;
22-
}
19+
@include focus-indicator(0.2rem);
2320

2421
&::placeholder {
2522
opacity: 0.7;
@@ -48,22 +45,17 @@
4845
padding: 0 1rem 1rem 1rem;
4946
overscroll-behavior: contain;
5047
height: 35rem;
48+
top: 0.4rem;
5149
overflow-y: scroll;
5250
position: relative;
53-
top: -0.7rem;
54-
border-left: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border);
55-
border-right: var(--pagefind-ui-border-width) solid
56-
var(--pagefind-ui-border);
57-
border-bottom: var(--pagefind-ui-border-width) solid
58-
var(--pagefind-ui-border);
59-
border-bottom-left-radius: var(--pagefind-ui-border-radius);
60-
border-bottom-right-radius: var(--pagefind-ui-border-radius);
51+
border-radius: var(--pagefind-ui-border-radius);
6152
z-index: 3;
6253
}
6354

6455
.pagefind-ui__result-link {
6556
color: var(--link-default);
6657
text-decoration: underline;
58+
border-radius: var(--border-radius-s);
6759

6860
&:hover,
6961
&:focus {
@@ -76,10 +68,8 @@
7668
color: var(--link-hovered);
7769
}
7870

79-
.pagefind-ui__result-link:focus {
80-
outline: 0.2rem solid orange;
81-
outline-offset: 0.1rem;
82-
border-radius: var(--border-radius-s);
71+
.pagefind-ui__result-link {
72+
@include focus-indicator(0.2rem);
8373
}
8474

8575
.pagefind-ui__result-link::before {
@@ -92,11 +82,14 @@
9282
}
9383

9484
.pagefind-ui__button {
95-
background-color: var(--bg-accent);
85+
border: 0.2rem solid var(--link-default);
86+
border-radius: var(--border-radius-m);
87+
background: transparent;
88+
color: var(--body-color);
9689

9790
&:hover,
9891
&:focus {
99-
background-color: var(--bg-accent2);
92+
background: rgba($link-hovered, 0.15);
10093
}
10194
}
10295
}

0 commit comments

Comments
 (0)