Bootstrap tabs WAI-ARIA attributes set for better accessibility
Created by: bassettsj
Again from the paypal/bootstrap-accessibility-plugin, these changes should be added to the documentation and the JS plugin.
Tab Panel
Add ARIA roles like tablist, presentation, and tab for tabs UL, LI.- Add tabIndex,
aria-expanded, aria-selected,aria-controlsfor tab. - Add ARIA roles of
tabpanel, tabIndex, aria-hidden, and aria-labelledBy for tabPanel. - Add keydown event listener for the tab to work with keyboard.
- Dynamically flip tabIndex, aria-selected, and
aria-expandedfor tab when it is activated and add aria-hidden to hide the previously visible tab.