posthtml-aria-tabs
Version:
Write accessible tabs with minimal markup
26 lines (20 loc) • 322 B
HTML
<ul role="tablist">
<li>
<a href="#foo" aria-selected="true">Foo</a>
</li>
<li>
<a href="#bar">Bar</a>
</li>
<li>
<a href="#qux">Qux</a>
</li>
</ul>
<section id="foo">
This is the foo tab.
</section>
<section id="bar">
This is the bar tab.
</section>
<section id="qux">
This is the qux tab.
</section>