Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote explicit ID on tab #57

Open
mojavelinux opened this issue May 21, 2023 · 1 comment
Open

Promote explicit ID on tab #57

mojavelinux opened this issue May 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mojavelinux
Copy link
Member

For those who want to assign a stable ID to a tab, it should be possible to specify the ID explicitly on the tab item. To do so, the extension should look for the anchor at the start of the dlist entry and promote it. For example:

[tabs]
====
[[my-tab-id]]Tab A::
Tab B::
====

The ID of the tab with the content (i.e., label) "Tab A" would be my-tab-id.

Technically this already works in practice. The list item for the tab still gets an auto-generated ID, but the tab also responds to the custom ID specified at the start of the label.

I think the question here is whether the explicit ID should replace the auto-generated ID. I feel like it probably should. The output we would expect, then, is:

<li id="my-tab-id" class="tab">
<p>Tab A</p>
</li>

I also wonder whether it should be possible to specify whether the ID of the tabs (i.e., tabset) should be prepended to the explicit ID (like when it is generated) or whether the ID should be used as is.

@cunka
Copy link

cunka commented Jul 23, 2023

I think user additional control over the generated ID fits well with those who are using custom style sheets/ HTML backends.
It then allows those with coding conventions/branding guidelines to use terminology unique to there documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants