accessibility fixes
This commit is contained in:
parent
86fc78a864
commit
6b823aca81
13 changed files with 18 additions and 18 deletions
|
@ -1,23 +1,23 @@
|
|||
<nav class="flex justify-between mt-8 items-center">
|
||||
{% if pagination.href.previous %}
|
||||
<a href="{{ pagination.href.previous }}">
|
||||
<button class="py-2 pr-4 text-primary-400 hover:text-primary-500 dark:hover:text-primary-300">Previous</button>
|
||||
<button class="py-2 pr-4 text-primary-400 hover:text-primary-500 dark:hover:text-primary-300" aria-label="Previous page">Previous</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="py-2 pr-4 cursor-not-allowed disabled:opacity-50" disabled>Previous</button>
|
||||
<button class="py-2 pr-4 cursor-not-allowed disabled:opacity-50" aria-label="Previous page (disabled)" disabled>Previous</button>
|
||||
{% endif %}
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
{% for pageEntry in pagination.pages %}
|
||||
{% if page.url == pagination.hrefs[forloop.index0] %}
|
||||
<a href="{{ pagination.hrefs[forloop.index0] }}" aria-current="page">
|
||||
<button class="w-8 h-8 rounded-full text-white dark:text-gray-900 bg-primary-400 hover:bg-primary-500 dark:hover:bg-primary-300">
|
||||
<button class="w-8 h-8 rounded-full text-white dark:text-gray-900 bg-primary-400 hover:bg-primary-500 dark:hover:bg-primary-300" aria-label="Go to page {{forloop.index}}">
|
||||
{{ forloop.index }}
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ pagination.hrefs[forloop.index0] }}">
|
||||
<button class="py-2 px-4">
|
||||
<button class="py-2 px-4" aria-label="Go to page {{forloop.index}}">
|
||||
{{ forloop.index }}
|
||||
</button>
|
||||
</a>
|
||||
|
@ -29,10 +29,10 @@
|
|||
{% if pagination.href.next %}
|
||||
<a href="{{ pagination.href.next }}">
|
||||
<button class="py-2 pl-4">
|
||||
<button class="py-2 pl-4 text-primary-400 hover:text-primary-500 dark:hover:text-primary-300">Next</button>
|
||||
<button class="py-2 pl-4 text-primary-400 hover:text-primary-500 dark:hover:text-primary-300" aria-label="Next page">Next</button>
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="py-2 pl-4 cursor-not-allowed disabled:opacity-50" disabled>Next</button>
|
||||
<button class="py-2 pl-4 cursor-not-allowed disabled:opacity-50" aria-label="Next page (disabled)" disabled>Next</button>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
|
Reference in a new issue