diff --git a/app/components/DS/toggle.html.erb b/app/components/DS/toggle.html.erb index 5b9fe94de..327a995b4 100644 --- a/app/components/DS/toggle.html.erb +++ b/app/components/DS/toggle.html.erb @@ -1,4 +1,5 @@
+ <%# Paired hidden field carries the off-state value when the checkbox is unchecked. Do NOT add an external `hidden_field_tag` with the same `name` in the caller view — it causes ID/label collisions and duplicate params. %> <%= hidden_field_tag name, unchecked_value, id: nil %> <%# `role="switch"` upgrades the underlying checkbox so AT users hear "switch, on" / "switch, off" instead of "checkbox, checked". The