Wrap Tab/Accordion Heading with
Permalink Browser Info Environment
Is there a relatively simple way to wrap the tab heading text with <h2></h2>? I don't want to modify the styling to match the theme's H2 styling, I just want the header text to render as H2 and inherit that style.
No other issues so far-- many thanks for developing something so incredibly useful!
No other issues so far-- many thanks for developing something so incredibly useful!
Type: | Ticket |
---|---|
Status: | Resolved |
so, this code adopts the <H2></H2> styling but doesn't do anything:
whereas this code works but retains default tab styling:
If I inspect the rendered HTML, I don't even see "<h2></h2>".
I think my best option at this point is to just address this via CSS and style the anchor tag to match the theme's default styling for H2. There's no non-presentation case for the header tag that justifies further modification to code that works just fine as is.
We can mark this one as 'resolved'-- many thanks for your time!
whereas this code works but retains default tab styling:
If I inspect the rendered HTML, I don't even see "<h2></h2>".
I think my best option at this point is to just address this via CSS and style the anchor tag to match the theme's default styling for H2. There's no non-presentation case for the header tag that justifies further modification to code that works just fine as is.
We can mark this one as 'resolved'-- many thanks for your time!
I am not surprised. The styling of tabs comes from the tabs css, so I would expect to be stronger than anything that could come from the theme, even when the tabs render with H2 elements.
As you have suggested, adjusting the font/size of the tabs in the css of your template and forgetting the actual H2 elements will be the best option going forwards.
As you have suggested, adjusting the font/size of the tabs in the css of your template and forgetting the actual H2 elements will be the best option going forwards.
Not that the code in a MT template provides a proforma, it is not the actual code used, but a representation which is then manipulated and replicated by MT to wrap blocks.
Taking the default template as an example, and calling the new template jl_magic_tabs_default_h2, the important part would be something like:
Whilst this wraps the tab heading links in an <h2>, the actual styling will be whatever the theme css does under such circumstances.