You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, definitely a bug here. You identified the line at fault but the reason is that the custom attributes are in the legend hash and not in kwargs. This class is a bit out of step with its siblings due to the way it used to be structured, I'll bring it inline and add some tests on this behaviour. Thanks for reporting 👍
With the following template
the following HTML is output:
Note how
a=b
does not appear on the<legend>
element, as suggested in the documentation, and as shown to work as an option forcaption
.https://github.com/DFE-Digital/govuk_design_system_formbuilder/blob/d269218348fd976af8f05850664cd38699a22370/lib/govuk_design_system_formbuilder/elements/legend.rb#L7-L28
I’m wondering if
@html_attributes = kwargs
should appear within the clausewhen Hash
(but that’s just a wild and uninformed stab in the dark).The text was updated successfully, but these errors were encountered: