Make accessibility fixes

This commit is contained in:
Kaan Barmore-Genç 2024-05-09 23:08:51 -05:00
parent b9e3be8042
commit 9bd3bf32fd
Signed by: kaan
GPG key ID: B2E280771CD62FCF
2 changed files with 9 additions and 5 deletions

View file

@ -21,7 +21,7 @@
}
/* Disabled */
button {
button[disabled] {
opacity: 0.6;
cursor: unset;
}

View file

@ -46,14 +46,18 @@
</ul>
<div class="pagination-controls">
<Button disabled={data.page < 3} href={'/posts/'}><ArrowLineLeft /></Button>
<Button disabled={data.page < 3} href={'/posts/'}
><ArrowLineLeft aria-label="first page" /></Button
>
<Button disabled={data.page === 1} href={data.page === 2 ? '/posts/' : `/posts/${data.page - 1}`}
><ArrowLeft /></Button
><ArrowLeft aria-label="previous page" /></Button
>
<span class="current-page">{data.page}</span>
<Button disabled={!data.hasMore} href="/posts/{data.page + 1}"><ArrowRight /></Button>
<Button disabled={!data.hasMore} href="/posts/{data.page + 1}"
><ArrowRight aria-label="next page" /></Button
>
<Button disabled={data.page > data.pageCount - 2} href="/posts/{data.pageCount}"
><ArrowLineRight /></Button
><ArrowLineRight aria-label="last page" /></Button
>
</div>