Skip to content

Commit bdfb480

Browse files
committed
Merge branch 'development'
2 parents 6697727 + b6cd2d6 commit bdfb480

23 files changed

Lines changed: 325 additions & 144 deletions

File tree

resources/css/components/_cards.scss

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,27 @@
6464
border-radius: 0.625rem;
6565
}
6666

67-
.card-title {
67+
.expedition-card-title,
68+
.bingo-card-title,
69+
.event-card-title {
70+
margin-top: 0;
71+
margin-bottom: 0.5rem;
72+
font-family: Raleway, sans-serif;
73+
font-size: 1.5rem;
74+
line-height: 1.2;
75+
}
76+
77+
.expedition-card-title {
6878
color: #ffffff;
6979
}
7080

81+
.bingo-card-meta,
82+
.event-card-status,
83+
.event-card-meta {
84+
font-family: Raleway, sans-serif;
85+
font-weight: 400;
86+
}
87+
7188
.card-body-img-top {
7289
border-bottom-left-radius: 0.625rem;
7390
border-bottom-right-radius: 0.625rem;
@@ -127,6 +144,10 @@
127144
opacity: 1;
128145
}
129146

147+
.event-card-status-completed {
148+
font-weight: 700;
149+
}
150+
130151
.card .btn-outline-primary {
131152
border-color: $brand-red;
132153
color: $brand-red;

resources/css/layout/_footer.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,15 @@ footer a:focus {
2828
color: #ffffff;
2929
text-decoration: underline;
3030
}
31+
32+
.footer-connect-heading {
33+
margin-top: 1.5rem;
34+
color: #383333;
35+
font-family: Raleway, sans-serif;
36+
font-size: 1.25rem;
37+
font-weight: 700;
38+
line-height: 1.2;
39+
-webkit-font-smoothing: antialiased;
40+
-moz-osx-font-smoothing: grayscale;
41+
text-rendering: optimizeLegibility;
42+
}

resources/css/pages/_home.scss

Lines changed: 102 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ h1.project-wide {
8787
color: #666; /* was #888; darkened to meet WCAG AA on white */
8888
}
8989

90+
.project-wide-subtitle {
91+
display: inline-block;
92+
font-size: 16px;
93+
color: #444;
94+
}
95+
9096
.content-header {
9197
font-size: 2.875rem;
9298
color: #666; /* was #888; darkened to meet WCAG AA on white */
@@ -126,39 +132,54 @@ h1.project-wide {
126132
height: 100%;
127133
}
128134

129-
#external-carousel-btns > li {
135+
#external-carousel-btns {
136+
padding-left: 0;
137+
margin-bottom: 0;
138+
}
139+
140+
#external-carousel-btns .list-inline-item {
141+
margin-right: 0.5rem;
142+
}
143+
144+
#external-carousel-btns .list-inline-item:last-child {
145+
margin-right: 0;
146+
}
147+
148+
#external-carousel-btns .carousel-step-button {
149+
display: inline-flex;
150+
align-items: center;
151+
justify-content: center;
130152
width: 70px;
131153
height: 70px;
132-
font-size: 1.875rem;
133-
text-align-all: center;
134-
color: #4b5563;
154+
padding: 0;
135155
border: 2px solid $brand-red;
136156
border-radius: 50%;
137157
background-color: #ffffff;
158+
color: #4b5563;
159+
font-size: 1.875rem;
160+
line-height: 1;
138161
box-shadow: 0 0 10px rgba(0, 0, 0, .25);
139-
padding-top: 8px;
140-
}
141-
142-
#external-carousel-btns > li:hover {
143-
background-color: $brand-red;
144-
color: #ffffff;
145162
cursor: pointer;
163+
appearance: none;
164+
-webkit-appearance: none;
146165
}
147166

148-
#external-carousel-btns li.active {
167+
#external-carousel-btns .carousel-step-button:hover,
168+
#external-carousel-btns .carousel-step-button.active,
169+
#external-carousel-btns .carousel-step-button[aria-current="true"] {
149170
background-color: $brand-red;
150171
color: #ffffff;
151172
}
152173

153-
#external-carousel-btns > li:focus {
174+
#external-carousel-btns .carousel-step-button:focus {
154175
outline: none;
155176
}
156177

157-
#external-carousel-btns > li:focus-visible {
178+
#external-carousel-btns .carousel-step-button:focus-visible {
158179
box-shadow:
159-
0 0 0 3px rgba(255, 255, 255, 0.95),
160-
0 0 0 6px rgba($brand-red, 0.65),
161-
0 0 10px rgba(0, 0, 0, .25);
180+
0 0 0 3px rgba(255, 255, 255, 0.95),
181+
0 0 0 6px rgba($brand-red, 0.65),
182+
0 0 10px rgba(0, 0, 0, .25);
162183
}
163184

164185
.circle-slider h3 {
@@ -172,3 +193,68 @@ h1.project-wide {
172193
color: black;
173194
text-align: center;
174195
}
196+
197+
.project-detail-heading {
198+
display: block;
199+
margin-top: 1.5rem !important;
200+
margin-bottom: 0.5rem !important;
201+
color: #383333;
202+
font-family: Raleway, sans-serif;
203+
font-size: 1.25rem;
204+
font-weight: 700;
205+
line-height: 1.2;
206+
-webkit-font-smoothing: antialiased;
207+
-moz-osx-font-smoothing: grayscale;
208+
text-rendering: optimizeLegibility;
209+
}
210+
211+
.a11y-target-link {
212+
display: inline-flex;
213+
align-items: center;
214+
justify-content: center;
215+
min-width: 44px;
216+
min-height: 44px;
217+
}
218+
219+
.carousel-step-button {
220+
display: inline-flex;
221+
align-items: center;
222+
justify-content: center;
223+
width: 82px;
224+
height: 82px;
225+
padding: 0;
226+
border-radius: 50%;
227+
border: 2px solid $brand-red;
228+
background-color: #fff;
229+
color: #3f5368;
230+
font-size: 2.25rem;
231+
line-height: 1;
232+
cursor: pointer;
233+
box-shadow: 0 0 25px rgba(0, 0, 0, .15);
234+
appearance: none;
235+
-webkit-appearance: none;
236+
}
237+
238+
.carousel-step-button.active,
239+
.carousel-step-button[aria-current="true"] {
240+
background-color: $brand-red;
241+
color: #fff;
242+
}
243+
244+
.carousel-step-button:hover {
245+
text-decoration: none;
246+
}
247+
248+
.carousel-step-button:focus {
249+
outline: 2px solid #3f5368;
250+
outline-offset: 3px;
251+
}
252+
253+
.carousel-step-button:focus:not(:focus-visible) {
254+
outline: none;
255+
}
256+
257+
.carousel-step-button:focus-visible {
258+
outline: 2px solid #3f5368;
259+
outline-offset: 3px;
260+
}

resources/js/amChartTranscript.js

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $(function () {
2020
am4core.options.autoDispose = true;
2121

2222
let a11yScheduled = false;
23+
let transcriptChartA11yObserver = null;
2324

2425
function scheduleTranscriptChartA11yFix() {
2526
if (a11yScheduled) return;
@@ -31,6 +32,20 @@ $(function () {
3132
});
3233
}
3334

35+
function makeNodeUnfocusable(node) {
36+
node.removeAttribute('tabindex');
37+
node.removeAttribute('focusable');
38+
node.removeAttribute('role');
39+
node.removeAttribute('aria-label');
40+
node.removeAttribute('aria-labelledby');
41+
node.removeAttribute('aria-controls');
42+
node.removeAttribute('aria-checked');
43+
node.removeAttribute('aria-hidden');
44+
node.setAttribute('tabindex', '-1');
45+
node.setAttribute('focusable', 'false');
46+
node.setAttribute('aria-hidden', 'true');
47+
}
48+
3449
function fixTranscriptChartSvgA11y() {
3550
try {
3651
const container = document.getElementById('transcripts');
@@ -39,30 +54,76 @@ $(function () {
3954
const svg = container.querySelector('svg');
4055
if (!svg) return;
4156

42-
// We expose the accessible name/description on #transcripts (HTML),
43-
// so hide the amCharts SVG internals from screen readers/scanners.
4457
svg.setAttribute('aria-hidden', 'true');
4558
svg.setAttribute('focusable', 'false');
4659

47-
// Remove amCharts-generated landmark-ish nodes that Silktide flags as "g field label".
48-
svg.querySelectorAll('g[role], g[aria-label], g[aria-labelledby]').forEach(function (node) {
60+
svg.querySelectorAll(
61+
'[role], [aria-label], [aria-labelledby], [aria-controls], [aria-checked]'
62+
).forEach(function (node) {
4963
node.removeAttribute('role');
5064
node.removeAttribute('aria-label');
5165
node.removeAttribute('aria-labelledby');
66+
node.removeAttribute('aria-controls');
67+
node.removeAttribute('aria-checked');
5268
});
5369

54-
// Also strip focus hooks if any appear.
55-
svg.querySelectorAll('[tabindex]').forEach(function (node) {
56-
node.removeAttribute('tabindex');
70+
svg.querySelectorAll(
71+
'[tabindex], [focusable], [role="switch"], [aria-controls], [aria-checked]'
72+
).forEach(function (node) {
73+
makeNodeUnfocusable(node);
5774
});
58-
svg.querySelectorAll('[focusable]').forEach(function (node) {
59-
node.removeAttribute('focusable');
75+
76+
svg.querySelectorAll(
77+
'[aria-hidden="true"], [display="none"], [visibility="hidden"], [opacity="0"]'
78+
).forEach(function (node) {
79+
makeNodeUnfocusable(node);
80+
81+
node.querySelectorAll(
82+
'a, button, [tabindex], [focusable], [role], [aria-controls], [aria-checked]'
83+
).forEach(function (child) {
84+
makeNodeUnfocusable(child);
85+
});
6086
});
6187
} catch (e) {
6288
// swallow
6389
}
6490
}
6591

92+
function observeTranscriptChartA11y() {
93+
const container = document.getElementById('transcripts');
94+
if (!container) return;
95+
96+
if (transcriptChartA11yObserver) {
97+
transcriptChartA11yObserver.disconnect();
98+
}
99+
100+
transcriptChartA11yObserver = new MutationObserver(function (mutations) {
101+
for (const mutation of mutations) {
102+
if (mutation.type === 'childList' || mutation.type === 'attributes') {
103+
scheduleTranscriptChartA11yFix();
104+
return;
105+
}
106+
}
107+
});
108+
109+
transcriptChartA11yObserver.observe(container, {
110+
childList: true,
111+
subtree: true,
112+
attributes: true,
113+
attributeFilter: [
114+
'tabindex',
115+
'focusable',
116+
'role',
117+
'aria-hidden',
118+
'aria-label',
119+
'aria-labelledby',
120+
'display',
121+
'visibility',
122+
'opacity',
123+
],
124+
});
125+
}
126+
66127
let buildChart = function (data) {
67128
let transcripts = am4core.createFromConfig(data, "transcripts", am4charts.XYChart);
68129

@@ -91,6 +152,7 @@ $(function () {
91152

92153
transcripts.events.on('ready', function () {
93154
$("#script-modal").modal("hide");
155+
observeTranscriptChartA11y();
94156
scheduleTranscriptChartA11yFix();
95157
});
96158
},

resources/views/admin/bingo/index.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class="btn btn-primary my-4 ml-2 text-uppercase"><i class="fas fa-plus-circle"><
1818

1919
<div class="row">
2020
@if($bingos->isNotEmpty())
21+
<h2 class="sr-only">{{ t('Bingo games list') }}</h2>
2122
@foreach($bingos as $bingo)
2223
@include('admin.bingo.partials.bingo-loop')
2324
@endforeach

resources/views/admin/bingo/partials/bingo-loop.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="col-md-4 mb-4">
22
<div class="card px-4 box-shadow h-100">
33
<div class="card-body text-center">
4-
<h4 class="text-center pt-4">{{ $bingo->title }}</h4>
5-
<h5 class="text-center color-action">
4+
<h3 class="text-center pt-4 bingo-card-title">{{ $bingo->title }}</h3>
5+
<p class="text-center color-action bingo-card-meta">
66
{{ $bingo->present()->create_date_to_string }}
77
{{ t('for') }}<br>
88
{{ $bingo->project->title }}
9-
</h5>
9+
</p>
1010
{!! $bingo->present()->generate_card_button !!}
1111
</div>
1212
<div class="card-footer">

resources/views/admin/event/index.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class="btn btn-primary my-4 ml-2 text-uppercase"><i class="fas fa-plus-circle"><
2222
</div>
2323
</div>
2424

25+
<h2 class="sr-only">{{ t('Events list') }}</h2>
2526
<div class="row">
2627
<div id="active-events-main" class="col-sm-12 show">
2728
<livewire:admin.events-index type="active" />

resources/views/admin/event/partials/event-loop.blade.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<div class="card px-4 box-shadow h-100">
33
<div class="card-body text-center">
44
@if(event_before($event))
5-
<h3 class="card-text">{{ t('Starting') }} {{ $event->present()->start_date_to_string }}</h3>
5+
<p class="card-text event-card-status">{{ t('Starting') }} {{ $event->present()->start_date_to_string }}</p>
66
@elseif( ! event_active($event))
7-
<h3 class="card-text">{{ t('Completed') }}</h3>
7+
<p class="card-text event-card-status event-card-status-completed">{{ t('Completed') }}</p>
88
@else
9-
<h2 class="card-text">{{ t('Time Remaining') }}</h2>
9+
<p class="card-text event-card-status">{{ t('Time Remaining') }}</p>
1010
<div class="clockdiv" data-value="{{ $event->present()->scoreboard_date }}">
1111
<div>
1212
<span class="days"></span>
@@ -26,14 +26,14 @@
2626
</div>
2727
</div>
2828
@endif
29-
<h4 class="text-center pt-4">{{ $event->title }}</h4>
30-
<h5 class="text-center color-action">
29+
<h3 class="text-center pt-4 event-card-title">{{ $event->title }}</h3>
30+
<p class="text-center color-action event-card-meta">
3131
{{ $event->present()->start_date_to_string }}<br>
3232
{{ t('to') }}<br>
3333
{{ $event->present()->end_date_to_string }}<br>
3434
{{ str_replace('_', ' ', $event->timezone) }}<br>
3535
{{ t('for') }} {{ $event->project->title }}
36-
</h5>
36+
</p>
3737
</div>
3838
@if( ! event_before($event))
3939
<div class="text-center">

0 commit comments

Comments
 (0)