Created
April 3, 2017 21:18
-
-
Save backlineint/1166067639ac3f957e4b9ff02c632a9e to your computer and use it in GitHub Desktop.
Setting a Tab Index in a Twig Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="m-facet-checkboxes block-facet--checkbox"> | |
<h2 class="block-title">{{ facet_checkboxes.block_title }}</h2> | |
<ul class="js-facets-checkbox-links"> | |
{% for item in facet_checkboxes.checkboxes %} | |
{% set counter = ( counter | default(0) ) + 1 %} | |
<li class="facet-item"> | |
<input type="checkbox" class="facets-checkbox" tabindex="{{ counter }}" id="{{ item.id }}"> | |
<label for="{{ item.id }}"> | |
<span class="facet-item__value">{{ item.label }}</span> | |
{% if item.count %} | |
<span class="facet-item__count">({{ item.count }})</span> | |
{% endif %} | |
</label> | |
</li> | |
{% endfor %} | |
</ul> | |
<a href="#" class="facets-soft-limit-link">Show more</a> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment