mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Set tabindex to -1 when prev/next link is disabled
This commit is contained in:
@@ -36,6 +36,7 @@ const next = pageNum < totalPages ? "" : "disabled";
|
||||
|
||||
<nav class="pagination-wrapper" aria-label="Pagination Navigation">
|
||||
<LinkButton
|
||||
tabindex={prev === "disabled" ? "-1" : "0"}
|
||||
href={`/posts/${pageNum - 1}`}
|
||||
className={`mr-4 select-none ${prev}`}
|
||||
>
|
||||
@@ -47,6 +48,7 @@ const next = pageNum < totalPages ? "" : "disabled";
|
||||
Prev
|
||||
</LinkButton>
|
||||
<LinkButton
|
||||
tabindex={next === "disabled" ? "-1" : "0"}
|
||||
href={`/posts/${pageNum + 1}`}
|
||||
className={`ml-4 select-none ${next}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user