feat: modify tabbed interfaces to support keyboard accessibility (fixes #526)

This commit is contained in:
Ned Zimmerman
2021-02-27 11:47:03 -04:00
parent 7ed63bacc9
commit 9580bec154
6 changed files with 334 additions and 95 deletions

View File

@@ -18,11 +18,11 @@
<div class="block columns">
<div class="column">
<div class="tabs" role="tablist">
<div class="tabs">
<ul>
{% for shelf_tab in shelves %}
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}" role="tab" aria-selected="{% if shelf_tab.identifier == shelf.identifier %}true{% else %}false{% endif %}">{{ shelf_tab.name }}</a>
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}"{% if shelf_tab.identifier == shelf.identifier %} aria-current="page"{% endif %}>{{ shelf_tab.name }}</a>
</li>
{% endfor %}
</ul>