The pagination control is used to split content over a number of pages and guide users directly to a particular page or to the next or previous page.
- Include a title that describes how many page links are being displayed, and the overall number of links, eg. 'Showing 1 of 15'.
- Consider whether pagination is required - undertake user research activity to understand what an optimum page length would be for your content; it may be longer than you think, as scrolling can be less onerous for users than navigating between pages, depending on the scenario.
- A maximum of nine page number links should be displayed in large and medium views.
- A maximum of five page number links should be displayed in a small view.
- Don't use 'first' and 'last' links.
- Must not be used on dark accent colours.
Examples
Showing 1 of 15
Showing 8 of 15
Showing 15 of 15
Working example
Notes for developers
Will require some logic to be able to appropriately apply classes to the pagination items depending on where the currently selected page falls within the list.
Not built to work on dark accent colours.
Notes for testers
- Ensure that links can be accessed via the mouse as well as via tabbing using the keyboard.
- Use a screen reader to confirm that the links are understandable as to where they will be going when listed out of context of the page.
- Ensure that when hovering over a link the style changes noticeably.
- Ensure that when a link has focus the style changes noticeably.
- There should be a clear visual distinction between the current page, a hover state for selectable pages, non-selected pages, and Previous and Next links. Do not use first and last links or chevrons.
- Show a maximum of nine page links in a desktop or tablet view, or a maximum of five links for a mobile view.
Code Examples
Showing 1 of 15
Showing 8 of 15
Showing 15 of 15
<p class="u-text--center u-no-print">Showing ... of ...</p>
<div class="a-pagination">
<ul class="a-pagination-list a-list-plain">
<li class="a-pagination-list__item a-pagination-list__item--secondary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--secondary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--primary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--primary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--primary a-pagination-list__item--selected"><span>...</span></li>
<li class="a-pagination-list__item a-pagination-list__item--primary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--primary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--secondary"><a href="...">...</a></li>
<li class="a-pagination-list__item a-pagination-list__item--secondary"><a href="...">...</a></li>
</ul>
<p class="a-pagination__previous"><a href="..."><span>Previous</span></a></p>
<p class="a-pagination__next"><a href="..."><span>Next</span></a></p>
</div>
Classes overview
The following table gives you a quick overview of the CSS classes that can be applied.
Class | Outcome | Required | Applied to | Comments |
---|---|---|---|---|
.a-pagination |
Base style for pagination | Yes | div |
|
.a-pagination-list |
Base style for a pagination list | Yes | .a-pagination > .a-list-plain |
|
.a-pagination-list__item |
Base style for pagination list items | Yes | .a-pagination-list > li |
|
.a-pagination-list__item--primary |
Modifier to display this list item a all screen sizes | Yes | .a-pagination-list__item |
Maximum of five and must be all together. |
.a-pagination-list__item--secondary |
Modifier to display this list item at medium screen sizes or over | Yes | .a-pagination-list__item |
Maximum of four. Can be either side of any primary items |
.a-pagination-list__item--selected |
Modifier for the currently open page. | Yes | .a-pagination-list__item--primary |
Must not contain a link |
.a-pagination__previous |
Base style for previous page arrow | Yes | .a-pagination-list ~ p |
Is not included if the currently selected page is the first page. |
.a-pagination__next |
Base style for next page arrow | Yes | .a-pagination-list ~ p |
Is not included if the currently selected page is the last page. |
Keyboard operations
- TAB
-
Tabbing to an anchor should make the social link clearly visually different so that the focus point on the page is obvious to the user.
- SPACE or ENTER
-
With focus on an anchor, pressing SPACE or ENTER will open the relevant page.