Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USWDS Pagination Rules and Guidance

The US Web Design System released a Pagination component in version 2.12.0 which provides both HTML markup but also a set of behaviors/ practices to be followed. This project establishes a javascript module which takes in two inputs, maximum number of pages and current page number, and returns an array representing a proper sequence of page numbes, overflow indicators, and Previous/ Next text. In order to properly evaluate all scenarios, a visual test suite was established and is available as a GitHub.io page, https://mvogelgesang.github.io/uswdsPagination/.

Top line USWDS Guidance

  • Display at most, 9 elements which includes Previous, Next, Page Numbers, and Overflow indicators (...)
  • If 7 or less pages exist, truncate page number list to equal the number of pages present
  • Always display first, last, current, next, and previous page numbers (e.g. [1][...][7][8*][9][...][22])
  • Full guidance available at US Web Design System

About

javascript logic testing for USWDS Pagination Component https://designsystem.digital.gov/components/pagination/

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages