Skip to content

v2.0.0

Choose a tag to compare

@SimonKefas SimonKefas released this 10 Mar 13:47
· 3 commits to main since this release
1b75653

What's New

Instant Visual Feedback

  • Active tab class (is-active) is now applied immediately on click — no more waiting for content to finish transitioning.

Full WAI-ARIA Tabs Pattern

  • Arrow key navigation: Left/Right/Up/Down to move between tabs, Home/End to jump to first/last.
  • Roving tabindex: only the active tab is focusable via Tab key.
  • Removed aria-expanded from tabs mode (only used in accordion mode now).
  • Focusable panels: tab panels have tabindex="-1" so keyboard users can Tab into content.
  • data-tab-list attribute: optional wrapper for correct role="tablist" placement.

Smart Autoplay

  • Pauses on hover over the tab container.
  • Pauses on keyboard focus within the container.
  • Resets timer when user manually switches tabs.
  • Pauses when the browser tab is hidden (via visibilitychange).

Deep Linking

  • URL hash support (e.g. #tab-2) activates the matching tab on page load.
  • Listens for hashchange events for dynamic navigation.

Custom Events

  • tabs:change event emitted on the container with { tabId, link, content, instance } detail.

Bug Fixes

  • All <video> elements in a panel now play/pause (previously only the first).
  • Added missing showAllPanelsPlain() function that caused a ReferenceError when calling disable().