Add aria labels where needed, commit 1 of many (#37)

This commit is contained in:
Daniel Friesel 2020-01-28 20:26:15 +01:00
parent fca6a5df6c
commit bd8a825138
5 changed files with 15 additions and 15 deletions

View file

@ -218,12 +218,12 @@
<div class="card-action">
% if ($journey->{arr_name}) {
<a style="margin-right: 0;" href="/journey/comment">
<i class="material-icons left">comment</i> Kommentar
<i class="material-icons left" aria-hidden="true">comment</i> Kommentar
</a>
% }
% else {
<a class="action-undo blue-text" data-id="in_transit" data-checkints="<%= $journey->{timestamp}->epoch %>" style="margin-right: 0;">
<i class="material-icons left">undo</i> Checkin Rückgängig
<i class="material-icons left" aria-hidden="true">undo</i> Checkin Rückgängig
</a>
% }
% if (defined $journey->{arrival_countdown} and $journey->{arrival_countdown} <= 0) {
@ -252,7 +252,7 @@
data-url="<%= url_for('/status')->to_abs->scheme('https') %>/<%= current_user->{name} %>/<%= $journey->{sched_departure}->epoch %>"
% }
>
<i class="material-icons left">share</i> Teilen
<i class="material-icons left" aria-hidden="true">share</i> Teilen
</a>
% }
</div>
@ -273,9 +273,9 @@
</div>
<div class="card-action">
% my $url = 'https://marudor.de/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
<a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left">timeline</i> Zuglauf</a>
<a style="margin-right: 0;" href="<%= $url %>" aria-label="Zuglauf"><i class="material-icons left">timeline</i> Zuglauf</a>
% if ($journey->{extra_data}{trip_id}) {
<a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>?from=<%= $journey->{dep_name} %>&amp;to=<%= $journey->{arr_name} %>&amp;dark=<%= (session('theme') and session('theme') eq 'dark') ? 1 : 0 %>"><i class="material-icons left">map</i> Karte</a>
<a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>?from=<%= $journey->{dep_name} %>&amp;to=<%= $journey->{arr_name} %>&amp;dark=<%= (session('theme') and session('theme') eq 'dark') ? 1 : 0 %>"><i class="material-icons left" aria-hidden="true">map</i> Karte</a>
% }
</div>
</div>
@ -311,7 +311,7 @@
</div>
<div class="card-action">
<a class="action-undo blue-text" data-id="in_transit" data-checkints="<%= $journey->{timestamp}->epoch %>" style="margin-right: 0;">
<i class="material-icons left">undo</i> Checkin Rückgängig
<i class="material-icons left" aria-hidden="true">undo</i> Checkin Rückgängig
</a>
</div>
</div>

View file

@ -108,7 +108,7 @@
<div class="col s6 m6 l6 center-align">
<button class="btn waves-effect waves-light" type="submit" name="action" value="save">
Speichern
<i class="material-icons right">send</i>
<i class="material-icons right" aria-hidden="true">send</i>
</button>
</div>
</div>

View file

@ -231,7 +231,7 @@
%= form_for '/journey/edit' => (method => 'POST') => begin
%= hidden_field 'journey_id' => param('journey_id')
<button class="btn waves-effect waves-light" type="submit" name="action" value="edit">
<i class="material-icons left">edit</i>
<i class="material-icons left" aria-hidden="true">edit</i>
Bearbeiten
</button>
%= end
@ -242,7 +242,7 @@
%= form_for '/journey/edit' => (method => 'POST') => begin
%= hidden_field 'journey_id' => param('journey_id')
<button class="btn waves-effect waves-light" type="submit" name="action" value="edit">
<i class="material-icons left">edit</i>
<i class="material-icons left" aria-hidden="true">edit</i>
Bearbeiten
</button>
%= end
@ -252,7 +252,7 @@
data-id="<%= $journey->{id} %>"
data-checkin="<%= $journey->{checkin}->epoch %>"
data-checkout="<%= $journey->{checkout}->epoch %>">
<i class="material-icons left">delete_forever</i>
<i class="material-icons left" aria-hidden="true">delete_forever</i>
Löschen
</a>
</div>

View file

@ -59,7 +59,7 @@
</div>
<div class="center-align">
<button class="btn waves-effect waves-light btn-flat" type="submit" name="action" value="departures">
<i class="material-icons left">send</i>
<i class="material-icons left" aria-hidden="true">send</i>
Abfahrten
</button>
</div>

View file

@ -89,14 +89,14 @@
</div>
</li>
<li class="waves-effect waves-light">
<a onClick="javascript:toggleTheme()"><i class="material-icons">invert_colors</i></a>
<a onClick="javascript:toggleTheme()"><i class="material-icons" aria-label="Farbschema invertieren">invert_colors</i></a>
</li>
% if (is_user_authenticated()) {
<li class="<%= navbar_class('/history') %>"><a href='/history' title="History"><i class="material-icons">history</i></a></li>
<li class="<%= navbar_class('/account') %>"><a href="/account" title="Account"><i class="material-icons">account_circle</i></a></li>
<li class="<%= navbar_class('/history') %>"><a href='/history' title="History"><i class="material-icons" aria-label="Vergangene Zugfahrten">history</i></a></li>
<li class="<%= navbar_class('/account') %>"><a href="/account" title="Account"><i class="material-icons" aria-label="Account">account_circle</i></a></li>
% }
% else {
<li class="<%= navbar_class('/about') %>"><a href='/about' title="About"><i class="material-icons">info_outline</i></a></li>
<li class="<%= navbar_class('/about') %>"><a href='/about' title="About"><i class="material-icons" aria-label="Über Travelynx">info_outline</i></a></li>
% }
</ul>
</div>