diff --git a/lib/bones73k_web/live/user/settings/email.html.leex b/lib/bones73k_web/live/user/settings/email.html.leex
index d50ce90..a3e773a 100644
--- a/lib/bones73k_web/live/user/settings/email.html.leex
+++ b/lib/bones73k_web/live/user/settings/email.html.leex
@@ -19,14 +19,13 @@
<%= label f, :current_password, class: "form-label" %>
-
+
<%= icon_div @socket, "bi-lock", [class: "icon is-left text-muted fs-5"] %>
<%= password_input f, :current_password,
value: input_value(f, :current_password),
- class: "form-control",
- aria_describedby: error_ids(f, :current_password)
+ id: "user_email_current_password",
+ class: "form-control"
%>
- <%= error_tag f, :current_password %>
diff --git a/lib/bones73k_web/live/user/settings/password.html.leex b/lib/bones73k_web/live/user/settings/password.html.leex
index eca8b96..9815074 100644
--- a/lib/bones73k_web/live/user/settings/password.html.leex
+++ b/lib/bones73k_web/live/user/settings/password.html.leex
@@ -30,14 +30,13 @@
<%= label f, :current_password, class: "form-label" %>
-
+
<%= icon_div @socket, "bi-lock", [class: "icon is-left text-muted fs-5"] %>
<%= password_input f, :current_password,
value: input_value(f, :current_password),
- class: "form-control",
- aria_describedby: error_ids(f, :current_password)
+ id: "user_password_current_password",
+ class: "form-control"
%>
- <%= error_tag f, :current_password %>
diff --git a/lib/bones73k_web/views/error_helpers.ex b/lib/bones73k_web/views/error_helpers.ex
index abe52ed..3ec68f6 100644
--- a/lib/bones73k_web/views/error_helpers.ex
+++ b/lib/bones73k_web/views/error_helpers.ex
@@ -23,13 +23,13 @@ defmodule Bones73kWeb.ErrorHelpers do
end
defp error_common_opts(form, field, append, opts) do
- Keyword.put(opts, :phx_feedback_for, input_id(form, field))
+ Keyword.put_new(opts, :phx_feedback_for, input_id(form, field))
|> Keyword.update(:class, append, fn c -> "#{append} #{c}" end)
end
defp error_tag_opts({_err, err_index}, opts) do
input_id = Keyword.get(opts, :phx_feedback_for, "")
- Keyword.put(opts, :id, error_id(input_id, err_index))
+ Keyword.put_new(opts, :id, error_id(input_id, err_index))
end
defp error_id(input_id, err_index), do: "#{input_id}_feedback-#{err_index}"