Skip to content

Commit 1a2c943

Browse files
author
David Ng
committed
Fix login screen accessibility: add form labels, lang attribute, and update link contrast (autolab#1373)
1 parent fe44b53 commit 1a2c943

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

app/assets/stylesheets/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $autolab-light-red: #ffbec0;
77
$autolab-subtle-gray: #eee;
88
$autolab-highlight-gray: #ccc;
99
$autolab-black-text: #212121;
10-
$autolab-blue-text: #0869af;
10+
$autolab-blue-text: #0056b3;
1111
$autolab-green: #3a862d;
1212
$autolab-light-green: #ebffd2;
1313
$autolab-white: #fff;

app/views/devise/sessions/new.html.erb

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
<div class="sign-in-panel home">
1+
<div class="sign-in-panel home" lang="en">
22
<br>
33

44
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
55

66
<img src="/images/autolab.svg" alt="" class="valign login-logo">
77
<h5>Login to Autolab</h5>
88

9-
<div><%= f.email_field :email, autofocus: true, placeholder: "Email Address" %></div>
10-
<div><%= f.password_field :password, placeholder: "Password" %></div>
9+
<div>
10+
<%= f.label :email, "Email Address" %>
11+
<%= f.email_field :email, autofocus: true, placeholder: "Email Address" %>
12+
</div>
13+
<div>
14+
<%= f.label :password, "Password" %>
15+
<%= f.password_field :password, placeholder: "Password" %>
16+
</div>
1117

1218
<% if devise_mapping.rememberable? -%>
1319
<label>

0 commit comments

Comments
 (0)