tasvideos icon indicating copy to clipboard operation
tasvideos copied to clipboard

[F.Rq.] Anchor hyperlinks for tabs

Open YoshiRulz opened this issue 2 years ago • 2 comments

The previous proposal, #280, was rejected for being an X/Y problem—the solution to long articles being hard to navigate is to split the article, not to add more JavaScript. However, I think such hyperlinks could be useful when directing people to /Helping and similar, mostly-static pages.

Bootstrap's implementation of tabs already uses anchors, but they're auto-generated, and you can't use them in hyperlinks. (Also I agree with the docs in saying that tabs are semantically <button/>s, not <a/>s.)

If there's no way to repurpose the existing anchors, you can implement this behaviour by checking location and calling show on page load.

Not to be confused with #1595, which pertains to regular headers (!!) inside tabs confusing the TOC module.

YoshiRulz avatar Mar 29 '23 11:03 YoshiRulz

I'm having a bit of trouble understanding what's wanted here. Can you give an example? Something about anchors, which is the <a> element, but our tabs are already anchors?

Masterjun3 avatar Mar 29 '23 14:03 Masterjun3

As an example, I would like https://tasvideos.org/Helping#Coding to go to that page and switch to the "Coding" tab.

YoshiRulz avatar Mar 29 '23 14:03 YoshiRulz