Html Label tag for NumericTextBox

4 posts, 0 answers
  1. Jaap
    Jaap avatar
    96 posts
    Member since:
    Oct 2012

    Posted 10 Sep 2012 Link to this post

    Hello, I'm adding Label tags for all input controls.

    This works for almost all input controls, even for a dropdown, although I didn't expect that because the original input element is not visible in that case.

    But in the case of a NumericTextBox, the original input element is also not visible, but the label does not work.

    See this fiddle:

    Any clues?

    Thanks, Jaap
  2. Jaap
    Jaap avatar
    96 posts
    Member since:
    Oct 2012

    Posted 10 Sep 2012 Link to this post

    I found that placing the input control inside the label tag works fine. This is even better, because I now don't need to generate id's for the controls. See

    Regards, Jaap
  3. beauXjames
    beauXjames avatar
    20 posts
    Member since:
    Aug 2012

    Posted 14 Feb 2013 Link to this post

    One really shouldn't have to pack a label with anything other than text. It'll really screw with any accessibility tools for one. Secondly, I find it a problem as well. In my situation, I am bringing attention on focus to the control as well as the label...all goes well until I hit a Kendo UI component and since I don't have control over the id of the magically generated 'input' element with the default properties of the control, I can't access my existing logic and these instances must be handled separately.

  4. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 19 Feb 2013 Link to this post


    The NumericTextBox does not set id attribute to the input element used to hold formatted value. As it has more complex rendering then a normal input element, you will need to add specific id to the visible input and wire the label to it. As you said you will need to handler each widget separately.

    I will suggest you share your thoughts in a uservoice item If you need additional control over generated html through widget's options.

    All the best,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top