Skip to content

Comments

details-based tabset prototype#1890

Draft
vezwork wants to merge 1 commit intomainfrom
experimental/details-tabset
Draft

details-based tabset prototype#1890
vezwork wants to merge 1 commit intomainfrom
experimental/details-tabset

Conversation

@vezwork
Copy link
Contributor

@vezwork vezwork commented Feb 20, 2026

image

Adds a prototype of a <details> element based tabset. The tabset is visually and functionally identical to the existing tabset (although the styling is more hard-coded and e.g. doesn't support light mode for now).

It would be good to use the details elements for tabsets because it enables ctrl+f'ing into tabsets, text-fragment linking into tabsets, and may work well for search indexing, reportedly unlike bootstrap tabsets. It might also be good to have more control over our tabsets, so we could add e.g. better print styles (as suggested by @mine-cetinkaya-rundel).

Using (mutually exclusive) details elements here is semantic html, so it should be decent for accessibility; but bootstrap has put a lot of work into making their solution accessible, so we should be mindful of that.

Further prototyping work

A full prototype of this should be a Quarto extension. The Quarto extension would have a Lua filter that processess tabset syntax into the div structure shown in this prototype code. The extension would also contain the css, that I currently have inlined in the qmd, in its own file.

Reference

https://codepen.io/RYJASM/pen/eYoYeRg

@vezwork vezwork changed the title Add example of a details-based tabset details-based tabset prototype Feb 20, 2026
@vezwork vezwork marked this pull request as draft February 20, 2026 20:18
@github-actions github-actions bot temporarily deployed to pull request February 20, 2026 20:19 Inactive
@github-actions
Copy link
Contributor

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-1890.quarto.org

🔄 Modified Documents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant