Add aria-describedby attribute automatically

We were manually adding the attribute in many places, but not
everywhere. I'm assuming adding it where we didn't have it is doing no
harm.
This commit is contained in:
Javi Martín
2019-10-03 02:51:54 +02:00
parent 4a19bb6b77
commit 4f5de5be3b
10 changed files with 51 additions and 67 deletions

View File

@@ -8,11 +8,10 @@
<%= f.fields_for :organization do |fo| %>
<%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length, placeholder: t("devise_views.organizations.registrations.new.organization_name_label") %>
<%= fo.label :responsible_name %>
<p class="help-text" id="responsible-name-help-text"><%= t("devise_views.organizations.registrations.new.responsible_name_note") %></p>
<%= fo.text_field :responsible_name, placeholder: t("devise_views.organizations.registrations.new.responsible_name_label"),
maxlength: Organization.responsible_name_max_length, label: false,
aria: { describedby: "responsible-name-help-text" } %>
<%= fo.text_field :responsible_name,
placeholder: t("devise_views.organizations.registrations.new.responsible_name_label"),
maxlength: Organization.responsible_name_max_length,
hint: t("devise_views.organizations.registrations.new.responsible_name_note") %>
<% end %>
<%= f.email_field :email, placeholder: t("devise_views.organizations.registrations.new.email_label") %>