- 🇺🇸United States dww
This came up as today's random triage target in #bugsmash.
Yeah, this is definitely still a bug. A grep of the 11.x source for
form-radios
only finds these hits:modules/system/tests/src/Functional/Form/ElementsLabelsTest.php (for "form-radios-test") profiles/demo_umami/themes/umami/templates/classy/form/radios.html.twig:<div{{ attributes.addClass('form-radios') }}>{{ children }}</div> themes/claro/templates/form/radios.html.twig:<div{{ attributes.addClass('form-radios', 'form-boolean-group') }}>{{ children }}</div> themes/starterkit_theme/templates/form/radios.html.twig:<div{{ attributes.addClass('form-radios') }}>{{ children }}</div>
But yes, thankfully, the way core handles Twig templates has evolved enough that we can fix bugs like this again. 🎉 Yay!
- 🇺🇸United States dww
Sorry, completely missed this from #10:
Maybe we should open a follow-up to move classes from other form elements to Classy instead?
Interesting. So you think this is a bug?
lib/Drupal/Core/Render/Element/Checkbox.php: static::setAttributes($element, ['form-checkbox']);
?
- 🇺🇸United States bnjmnm Ann Arbor, MI
If there's evidence this could benefit users without introducing problems, I'm happy to FEFM approve
form-radios
getting added in a manner similar to other form elements.Just make a followup for a potential "do it right" version #19. I think it's a noble pursuit, but even if it were to happen, it would not be quick (FE this issue is almost 6 years old). While they wait, I'm OK with letting folks enjoy the consistent-but-not-DRUPALSTRONG addition of
form-radios
.