fix(presentation): window pagination links and stop nesting its landmark (Q-6.8-12)
Pagination links only the first and last page, the current page and its neighbours, with an aria-hidden ellipsis for a longer gap and the page itself for a one-page gap, so 5000 pages render five links instead of 5000. Inside CollectionPage, whose slot already is the pagination `nav`, Pagination renders a labelled group instead of a nested `nav`; on its own it stays a navigation landmark. Verified with tests/component/pagination.test.tsx (RED: 3 of 5 failed before the change) and the lane gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
21233e8d9b
commit
22d4e8a29d
@@ -6,6 +6,7 @@ import {
|
||||
LinkButton,
|
||||
type LinkTarget,
|
||||
} from "../design-system/primitives/core.tsx";
|
||||
import { PaginationLandmarkContext } from "../design-system/primitives/navigation.tsx";
|
||||
import { useLocale } from "../i18n/index.ts";
|
||||
|
||||
export type PageHeading = Readonly<{
|
||||
@@ -134,7 +135,9 @@ export function CollectionPage(
|
||||
className="collection-page__pagination"
|
||||
aria-label={message("template.pagination")}
|
||||
>
|
||||
{props.pagination}
|
||||
<PaginationLandmarkContext.Provider value>
|
||||
{props.pagination}
|
||||
</PaginationLandmarkContext.Provider>
|
||||
</nav>
|
||||
) : null}
|
||||
</StandardPage>
|
||||
|
||||
Reference in New Issue
Block a user