Is Q1 2015 ready for checkboxes and radiobuttons where label element is immediately followed by an input element?

2 posts, 0 answers
  1. Oscar
    Oscar avatar
    185 posts
    Member since:
    Oct 2010

    Posted 02 Apr 2015 Link to this post

    Hi Kendo Team,
    Q3 2014 documentation said the expected HTML for checkboxes and radiobuttons was as follows:
    <!-- Kendo UI Checkbox -->
    <input type="checkbox" id="checkbox" class="k-checkbox">
    <label class="k-checkbox-label" for="checkbox"></label>
     
    <!-- Kendo UI Radio button -->
    <input type="radio" id="radiobutton" class="k-radio">
    <label class="k-radio-label" for="radiobutton"></label>

    Does Q1 2015 release give a solution for label in first place like this?
    <!-- Kendo UI Checkbox -->
    <label class="k-checkbox-label" for="checkbox"></label>
    <input type="checkbox" id="checkbox" class="k-checkbox">

    Kind regards,
    Oscar.



  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 03 Apr 2015 Link to this post

    Hello Oscar,

    No, the label elements must be after the input elements. This is due to the CSS selectors for styling them, and supporting both flavors would double the selectors in complexity. However, you can safely have two labels for the checkbox:

        <label for="foo">Foo</label>

        <input id="foo" type="checkbox" class="k-checkbox" />
        <label class="k-checkbox-label" for="foo"></label>


    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top