# Pagination

Pagination divides a stable result set into navigable pages. Use it when users
need location, repeatable URLs, or direct movement through a bounded collection.
For open-ended feeds, a “Load more” pattern may preserve context better.

## Anatomy

Place pagination in a labelled `nav`. Provide previous and next controls,
nearby page links when useful, current-page state, and a concise result summary.
Mark the current page with `aria-current="page"`. Disabled-looking links
must not remain actionable.

## Behavior

- Give each page a stable URL when the content is navigational.
- Preserve filters and sort parameters during movement.
- Move focus to the updated results heading after a full in-place refresh, or
  allow normal browser navigation to manage focus.
- Announce loading and failure; never advance the page indicator before data is
  accepted.
- Clamp or redirect invalid page numbers safely.
- Reset to a valid page when filters reduce the result count.

A page-size selector is a separate labelled control. Changing it should explain
the new result range and avoid silently discarding user selection.

## Responsive behavior

Keep previous, current, and next available on narrow screens. Collapse distant
page numbers with noninteractive ellipses. Interactive targets must not shrink
below the product's pointer target standard.

## Verification

Test first, middle, final, empty, and out-of-range pages; browser back/forward;
deep links; long result counts; slow and failed requests; zoom; keyboard; and a
screen reader's announcement of current page and result range.
