nested covers tabs should work with screen reader

This commit is contained in:
Mouse Reeve
2020-11-08 19:34:41 -08:00
parent b7bc089d86
commit c37c6aae40
2 changed files with 20 additions and 26 deletions

View File

@ -21,7 +21,13 @@
<ul>
{% for book in shelf.books %}
<li class="{% if shelf_counter == 1 and forloop.first %}is-active{% endif %}" data-id="tab-book-{{ book.id }}">
<label for="book-{{ book.id }}" onclick="nestedTabChange(event)"><a>{% include 'snippets/book_cover.html' with book=book size="medium" %}</a></label>
<label for="book-{{ book.id }}" onclick="tabChange(event, nested=true)">
<div role="tab" tabindex="0" aria-selected="{% if shelf_counter == 1 and forloop.first %}true{% else %}false{% endif %}">
<a>
{% include 'snippets/book_cover.html' with book=book size="medium" %}
</a>
</div>
</label>
</li>
{% endfor %}
</ul>