Using placeholders having similar (or identical) text as already present as a label has a few issues. First, it's a distraction. Reading the same information twice is useless, requires an extra effort, and might even frustrate users. Second, if users start typing before reading the placeholder and see it disappear, they might think they're missing relevant information, delete what they typed, and read the placeholder. That will get them nowhere. Finally, we display placeholders using a text offering very low contrast against the background, so users don't think the placeholder is an actual value entered in the field. Using such low contrast makes the text hard to read, particularly for users with visual impairments. So we're removing these placeholders. This commit only deals with placeholder texts with similar (or identical) texts as the label text. There might be other places where we should replace placeholder texts with labels, but that's a different topic.
45 lines
1.6 KiB
Plaintext
45 lines
1.6 KiB
Plaintext
<%= back_link_to %>
|
|
|
|
<h2><%= t("devise_views.users.registrations.edit.edit") %></h2>
|
|
|
|
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
|
<%= render "shared/errors", resource: resource %>
|
|
<div class="row">
|
|
<div class="small-12 column">
|
|
<%= f.email_field :email,
|
|
label: t("devise_views.users.registrations.edit.email_label"),
|
|
autofocus: true %>
|
|
</div>
|
|
|
|
<div class="small-12 column">
|
|
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
<div><%= t("devise_views.users.registrations.edit.waiting_for") %> <%= resource.unconfirmed_email %></div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="small-12 column">
|
|
<%= f.password_field :password,
|
|
autocomplete: "off",
|
|
label: t("devise_views.users.registrations.edit.password_label"),
|
|
hint: t("devise_views.users.registrations.edit.leave_blank") %>
|
|
</div>
|
|
|
|
<div class="small-12 column">
|
|
<%= f.password_field :password_confirmation,
|
|
label: t("devise_views.users.registrations.edit.password_confirmation_label"),
|
|
autocomplete: "off" %>
|
|
</div>
|
|
|
|
<div class="small-12 column">
|
|
<%= f.password_field :current_password,
|
|
label: t("devise_views.users.registrations.edit.current_password_label"),
|
|
autocomplete: "off",
|
|
hint: t("devise_views.users.registrations.edit.need_current") %>
|
|
</div>
|
|
|
|
<div class="small-12 column">
|
|
<%= f.submit t("devise_views.users.registrations.edit.update_submit"), class: "button" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|