You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user selects a tab, the active tab element should set its attribute aria-selected=true and all other tabs should set aria-selected=false. bootstrap.js does this and at least one popular theme relies on this.
The reason I have filed an issue is because I don't need to use this event handling code when using bootstrap.js. Only with bootstrap-native do I need it. So I think this should be fixed.
I am not sure what would be the correct way to fix this in code, which is why I have filed an issue and not a PR.
The text was updated successfully, but these errors were encountered:
When a user selects a tab, the active tab element should set its attribute
aria-selected=true
and all other tabs should setaria-selected=false
. bootstrap.js does this and at least one popular theme relies on this.For demo, take a look at the following pages:
http://deftask-design.deftask.com.s3-website.us-east-2.amazonaws.com/bootstrap/index.html#features
This uses bootstrap.js and you'll see that both tabs are switched correctly and the active tab is highlighted.
Now look at http://deftask-design.deftask.com.s3-website.us-east-2.amazonaws.com/bn-tab-aria-selected-bug/index.html#features
This uses bootstrap-native alongwith my fixes from Fix clicks on child elements of a tab #253. You will notice that tabs switch correctly but the active tab does not get highlighted correctly.
Lastly look at http://deftask-design.deftask.com.s3-website.us-east-2.amazonaws.com/bn-tab-click-fix/index.html#features
This uses the fixed bootstrap native from the previous example alongwith a little bit of event handling that sets
aria-selected
when tab is hidden or shown. In this example tabs switch correctly and the active tab is also highlighted correctly on switching.The event handling code which fixes the issue is this:
The reason I have filed an issue is because I don't need to use this event handling code when using bootstrap.js. Only with bootstrap-native do I need it. So I think this should be fixed.
I am not sure what would be the correct way to fix this in code, which is why I have filed an issue and not a PR.
The text was updated successfully, but these errors were encountered: