summaryrefslogtreecommitdiff
path: root/templates/app.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-30 14:16:58 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-30 14:16:58 +0200
commit7eb656dd0a461f2782e601753ee96736b7ef0d3c (patch)
tree26118f86d0372c9a34b9636cd4c31a7492bc0e01 /templates/app.html.ep
parent44c35c7aadb4c7992c484053a6f4ddb4368bcb2e (diff)
do not mis-use aria-label; use aria-hidden and CSS content clipping instead
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r--templates/app.html.ep26
1 files changed, 15 insertions, 11 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 07c78bf..852d8a8 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -84,38 +84,40 @@
</div>
% }
% if ($departure->{sched_departure}) {
- <span class="dest" aria-label="nach <%= $departure->{destination} %>">
+ <span class="dest">
+ <span class="visually-hidden">nach</span>
%= $departure->{destination}
</span>
% }
% else {
- <span class="origin" aria-label="von <%= $departure->{origin} %>">
+ <span class="origin">
+ <span class="visually-hidden">von</span>
%= $departure->{origin}
</span>
% }
<span class="time <%= ($show_realtime and $departure->{delay} and not
$departure->{is_cancelled}) ? 'delayed' : q{} %>">
% if ($departure->{delay} and not $departure->{is_cancelled}) {
-% my $aria_delay = sprintf("Verspätung %d Minuten", $departure->{delay});
% if ($show_realtime) {
% if ($departure->{delay} > 0) {
- <span class="delaynorm" aria-label="<%= $aria_delay %>">(+<%= $departure->{delay} %>)</span>
+ <span class="delaynorm" aria-hidden="true">(+<%= $departure->{delay} %>)</span>
% }
% else {
- <span class="undelaynorm" aria-label="<%= $aria_delay %>">(<%= $departure->{delay} %>)</span>
+ <span class="undelaynorm" aria-hidden="true">(<%= $departure->{delay} %>)</span>
% }
% }
% else {
% if ($departure->{delay} > 0) {
- <span class="delay" aria-label="<%= $aria_delay %>">(+<%= $departure->{delay} %>)</span>
+ <span class="delay" aria-hidden="true">(+<%= $departure->{delay} %>)</span>
% }
% else {
- <span class="undelay" aria-label="<%= $aria_delay %>">(<%= $departure->{delay} %>)</span>
+ <span class="undelay" aria-hidden="true">(<%= $departure->{delay} %>)</span>
% }
% }
% }
% elsif ($departure->{missing_realtime}) {
- <span class="no-realtime" aria-label="Echtzeitdaten fehlen"><i class="material-icons" aria-hidden="true">gps_off</i></span>
+ <span class="visually-hidden">Echtzeitdaten fehlen</span>
+ <span class="no-realtime" aria-hidden="true"><i class="material-icons">gps_off</i></span>
% }
% if (param('detailed')) {
% my $arrow = '→';
@@ -139,11 +141,12 @@
% if (($departure->{scheduled_platform} and $departure->{platform} and
% $departure->{scheduled_platform} ne $departure->{platform})
% or $departure->{changed_platform}) {
- <span class="platform changed-platform" aria-label="Gleis <%= $departure->{platform} %>">
+ <span class="platform changed-platform">
% }
% else {
- <span class="platform" aria-label="Gleis <%= $departure->{platform} %>">
+ <span class="platform">
% }
+ <span class="visually-hidden">Gleis</span>
%= $departure->{platform}
</span>
% if ($departure->{info} and length $departure->{info}) {
@@ -152,7 +155,8 @@
</span>
% }
% else {
- <span class="route" aria-label="Über <%= $route_str %>">
+ <span class="route">
+ <span class="visually-hidden">über</span>
%= $route_str
</span>
% }