ember-validated-form icon indicating copy to clipboard operation
ember-validated-form copied to clipboard

Checkbox labels aren't wrapped in a span anymore

Open makepanic opened this issue 6 years ago • 0 comments

I think #95 introduced a regression where checkbox elements don't use a span wrapped label anymore.

https://github.com/adfinis-sygroup/ember-validated-form/pull/95/files#diff-3fdbc85ba77b90bb068fe83da64dee87L85 removed wrapping the checkbox label in a span by introducing a validated-label that is simply echoing the {{label}}.

I think it's my fault for not adding a test that checks that checkbox labels are also wrapped in a span.

There's probably a similar issue where validated-label isn't used for radio inputs. Meaning you can't customize the label there.

There are various possible options to solve this:

  • use validated-label for all label usages in validated-input
  • add span wrapping to validated-label, which means all validated-labels will change or
  • add wrapped attribute to validated-label which will be set to true for uses in checkbox or radio inputs

I can open a PR if we find a solution

makepanic avatar May 14 '18 14:05 makepanic