0

This is for: Kentico 11, kentico forms

I have been tracing an Accessibility violation caused by the CMSCheckbox. Finally found the issue. It seems kentico is forcing the label of the checkbox to be rendered even though it is empty. It is doing this by setting the Text property of the checkbox to a none breaking space if I do not set it to something.

I am using the CMSCheckbox in a form with a caption. I need the caption to be non empty as I use it for something else on submission of the form. Since the caption is a label for the same checkbox this violates yet another Accessibility rule of only having one label per control.

My question is: - Why has kentico done this? Why is the CMSCheckbox forced to always have a label when asp does not force it?

Taf Munyurwa
  • 1,444
  • 2
  • 16
  • 22

1 Answers1

1

This "hack" was added to support localization of the CMSCheckBox control. I am afraid but there are no settings available for this so you will need to create a custom form control and use the ASP check box inside it.

jurajo
  • 937
  • 5
  • 5
  • The thing is. The tooltip localizes perfectly without this none breaking space hack. It is such an obscure hack. It took me a while to find. It is just strange. I cannot work out a good reason to do it – Taf Munyurwa Jan 07 '20 at 12:58