Rationale
As we know the jQuery UI Tabs transform tabs based on the following code, which is not good for SEO and also does not make sense when user's web browser does not support javascript.
<div id="tabs">
<ul>
<li><a href="#tabs-1">Tab title 1</a></li>
<li><a href="#tabs-2">Tab title 2</a></li>
</ul>
<div id="tabs-1">tab</div>
<div id="tabs-2"></div>
</div>
So the idea is let js to grab titles and content from the default style of panels to create a tab region.
<h2 class="pane-title">Title</h2>
<div class="pane-content">Body</div>
Once a new tab has been created, then hide original style of pane
I have modified the code and it works. Please check attachment.
Any thoughts?
- Eric
Comments
Comment #1
zhangtaihao commentedI'm afraid the HEAD of the module has moved beyond the point where we can tell what modification you've made in the module you've uploaded.
I've rolled a patch against 7.x-1.x-dev to achieve more or less the same results (I hope). Could you please check if this patch agrees with what you did?
P.S. I would argue this is a bug since removing the pane title breaks accessibility. However, I'll leave it up to you to decide and to mark the patch as RTBC.
Comment #2
zhangtaihao commentedI have amended the patch to select:
instead of:
This should make it work for the Panels IPE.
Comment #3
zhangtaihao commentedAnother patch fix that does not hide nested pane titles directly under tabs.
Comment #4
socialnicheguru commentedgit apply 15*
error: patch failed: js/panels_tabs.js:8
error: js/panels_tabs.js: patch does not apply
Comment #5
zhangtaihao commentedHmm.. Don't know why it wouldn't.
In any case, you could check the patch against panels_tabs.js yourself.
Comment #6
zhangtaihao commentedIn any case, I forgot to include the panels_tabs.module changes in #3.
Here's a re-roll against 7.x-1.x incorporating both #2 and #3.
Comment #7
socialnicheguru commentedthis patch works when I use panels_tabs