Possible wrong behavior with disabled tabs

2 posts, 0 answers
  1. Ovidiu
    Ovidiu avatar
    7 posts
    Member since:
    Mar 2013

    Posted 29 May 2014 Link to this post


    It is possible that with the last update (2014.1.416) there was introduced some optimization which in fact break some functionality.
    Here is what I observed:
    We had in our code

    tabstrip.Add().Text("Tab caption").Content("").Enabled(false);

    This will produce  a markup for the tab ear which includes an aria-controls="undefined"

    Further debuging reflects a possible bug on the _updateContentElements function, it seems that content elements are not rendere anymore for the tabs with empty content. This will result in the following if being evaluated to TRUE
    if (contentElements.length && (items.length > contentElements.length)) {

    and inside of it the aria-controls is somehow messed up because first is assumed that there is an area-controls , then an "aria" data is set, and then the aria-controls is set from the "aria" data, this results in the end in to aria-controls = "undefined"

    To workaround this issue I had to change the above line to something similar to

    tabstrip.Add().Text("Tab caption").Content(" ").Enabled(false);

    This will make the IF above being evaluated as FALSE and then the other path creates proper aria-controls attribute

    The problem is that with this approach the tabs behave like "disabled" but they does not look like disabled.

  2. Kamen Bundev
    Kamen Bundev avatar
    1532 posts

    Posted 02 Jun 2014 Link to this post

    Hi Ovidiu,

    I can confirm this is a regression. We made an enhancement that while not directly related to this issue, had some changes that exposed it. You can see the bug report here. I've already fixed it and the fix will be available with the next internal build. Meanwhile you can use the workaround you've posted.

    I've also updated your Telerik points for the find.

    Kamen Bundev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top