You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/tabs.xml
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,36 @@
4
4
<desc>A single content area with multiple panels, each associated with a header in a list.</desc>
5
5
<longdesc>
6
6
<p>Tabs are generally used to break content into multiple sections that can be swapped to save space, much like an accordion.</p>
7
+
<p>Tabs have a particular set of markup that must be used in order for them to work properly:</p>
8
+
<ul>
9
+
<li>The tabs themselves must be in either an ordered (<code><ol></code>) or unordered (<code><ul></code>) list</li>
10
+
<li>Each tab "title" must be inside of a list item (<code><li></code>) and wrapped by an anchor (<code><a></code>) with an <code>href</code> attribute</li>
11
+
<li>Each tab panel may be any valid element but it must have an id which corresponds to the hash in the anchor of the associated tab.</li>
12
+
</ul>
7
13
8
14
<p>The content for each tab panel can be defined in-page or can be loaded via Ajax; both are handled automatically based on the <code>href</code> of the anchor associated with the tab. By default tabs are activated on click, but the events can be changed to hover via the <ahref="#option-event"><code>event</code></a> option.</p>
9
15
16
+
<p>Below is some sample markup:</p>
17
+
18
+
<pre><code><![CDATA[
19
+
<div id="tabs">
20
+
<ul>
21
+
<li><a href="#fragment-1">One</a></li>
22
+
<li><a href="#fragment-2">Two</a></li>
23
+
<li><a href="#fragment-3">Three</a></li>
24
+
</ul>
25
+
<div id="fragment-1">
26
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
27
+
</div>
28
+
<div id="fragment-2">
29
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
30
+
</div>
31
+
<div id="fragment-3">
32
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
33
+
</div>
34
+
</div>
35
+
]]></code></pre>
36
+
10
37
<h3>Keyboard interaction</h3>
11
38
12
39
<p>When focus is on a tab, the following key commands are available:</p>
0 commit comments