AcceDe-Web/tablist

Second tab open by default make followings visible

ryuran opened this issue · 0 comments

Hello,

The issue

When I mount the module on a tab-list with a tab open by default with data-open="true" every tab-panels of following tabs are aria-hidden="false"

Why it’s happening

https://github.com/AcceDe-Web/tablist/blob/master/lib/index.js#L304

opentab variable is not reset to false in the loop

https://github.com/AcceDe-Web/tablist/blob/master/lib/index.js#L311

so, opentab still true here

https://github.com/AcceDe-Web/tablist/blob/master/lib/index.js#L352

and it shouldn’t.

How to fix

It could be fixed using opentab = false ligne 312.

But we should add test for data-open.