Repository navigation
Releases
Releases · SimonKefas/custom-tab
v2.0.3
Full Changelog: v2.0.1...v2.0.3
Bug fixes and minor enhancements
Set height: 100% on crossfade panels wrapper The dynamically created [data-tabs-panels] wrapper only had position: relative, which gave it 0 height when panels use height: 100% inside grid/flex layouts. Now the wrapper gets height: 100% so the percentage chain resolves correctly and panels fill the containing grid cell. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2.0.0
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-expandedfrom tabs mode (only used in accordion mode now). - Focusable panels: tab panels have
tabindex="-1"so keyboard users can Tab into content. data-tab-listattribute: optional wrapper for correctrole="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
hashchangeevents for dynamic navigation.
Custom Events
tabs:changeevent 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 callingdisable().
v1.2.1
Added support for tab to accordions
Fix typo and enhance autoplay safety in tabs Fixed a typo in the activateTab function and improved comments for clarity. Added safety checks for autoplay in hidden panels.
Added API's and init logic
v1.1.0 Refactor tab initialization and management logic
Bug fixes for tab responsiveness
Refactor tab functionality with crossfade and autoplay Refactor tab initialization and activation logic for improved readability and functionality. Enhanced crossfade and autoplay features.
Improve tab hover responsiveness and add crossfade mode
- remove queued tab transitions so new hover interactions preempt older ones while guarding callbacks with transition tokens
- add a crossfade configuration option, cleanup helper, and container class to support overlapping fades
- document the new crossfade attributes and helper CSS for positioning panels during crossfades
Now supports (swiper-starter)
Added support for (swiper-starter) inside tab contents