feat: Add TabsExtension for tabbed content interfaces#130
Merged
dereuromark merged 2 commits intomasterfrom Mar 26, 2026
Merged
feat: Add TabsExtension for tabbed content interfaces#130dereuromark merged 2 commits intomasterfrom
dereuromark merged 2 commits intomasterfrom
Conversation
Transforms nested divs (:::: tabs / ::: tab) into accessible tabbed interfaces
with two output modes:
- CSS-only mode (default): Uses radio inputs + CSS sibling selectors, no JS needed
- ARIA mode: Uses semantic tablist/tab/tabpanel roles, requires minimal JS
Features:
- Tab labels extracted from first heading or label attribute
- Configurable classes for wrapper, panels, labels
- Collects selected state from {selected} attribute
- Full keyboard navigation support (ARIA mode)
- Documented CSS and JavaScript requirements in docblock
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #130 +/- ##
============================================
+ Coverage 93.94% 94.03% +0.08%
- Complexity 2385 2443 +58
============================================
Files 81 83 +2
Lines 6310 6469 +159
============================================
+ Hits 5928 6083 +155
- Misses 382 386 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
TabsExtensionthat transforms nested divs into accessible tabbed interfaces, supporting both CSS-only and ARIA-based rendering modes.Features
css(default) andaria{label="..."}attribute{selected}attributeSyntax
Note: Use 4 colons for outer wrapper, 3 for inner tabs (standard djot nesting).
Usage
Output Modes
CSS-only Mode
Uses radio inputs and CSS sibling selectors. No JavaScript required.
Required CSS:
ARIA Mode
Uses semantic ARIA roles. Requires JavaScript for interactivity.
Required JavaScript: