This is a migrated thread and some comments may be shown as answers.

Possible wrong behavior with disabled tabs

1 Answer 65 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Ovidiu
Top achievements
Rank 1
Ovidiu asked on 29 May 2014, 09:40 AM
Hello,

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.

Vasile

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 02 Jun 2014, 10:19 AM
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.

Regards,
Kamen Bundev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TabStrip
Asked by
Ovidiu
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or