Use hints instead of placeholders in URL fields

Placeholders are hard to read due to their low contrast, and users might
want to read them after they're already gone, and so they cause both
accessibility and usability issues.
This commit is contained in:
Javi Martín
2021-11-03 22:38:15 +01:00
committed by Senén Rodero Rodríguez
parent 3a704005b0
commit 048458dce8
4 changed files with 5 additions and 4 deletions

View File

@@ -51,7 +51,7 @@
</div>
<div class="small-12 column">
<%= translations_form.text_field :main_link_url, placeholder: t("admin.shared.example_url") %>
<%= translations_form.text_field :main_link_url, hint: t("admin.shared.example_url") %>
</div>
<% end %>

View File

@@ -21,9 +21,10 @@
<%= translations_form.text_field :main_link_text %>
</div>
</div>
<div class="row expanded">
<div class="small-12 medium-9 large-6 column end">
<%= translations_form.text_field :main_link_url, placeholder: t("admin.shared.example_url") %>
<%= translations_form.text_field :main_link_url, hint: t("admin.shared.example_url") %>
</div>
</div>
<% end %>

View File

@@ -1369,7 +1369,7 @@ en:
show_results_and_stats: "Show results and stats"
results_and_stats_reminder: "Marking these checkboxes the results and/or stats will be publicly available and every user will see them."
close_modal: Close modal
example_url: "https://consulproject.org"
example_url: "For example, https://consulproject.org or /help"
geozones:
index:
title: Geozone

View File

@@ -1368,7 +1368,7 @@ es:
show_results_and_stats: "Mostrar resultados y estadísticas"
results_and_stats_reminder: "Si marcas estas casillas los resultados y/o estadísticas serán públicos y podrán verlos todos los usuarios."
close_modal: Cerrar ventana emergente
example_url: "https://consulproject.org"
example_url: "Por ejemplo, https://consulproject.org o /help"
geozones:
index:
title: Zonas