DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

How to Build Accessible Bootstrap Pagination

A practical Bootstrap 5.3 pagination example, with guidance for active and disabled links, accessible labels, sizing, alignment, and customization.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Bootstrap pagination lets readers move through related content split across pages. In Bootstrap 5.3, build it as a labeled <nav> containing a list of links, mark the current page with aria-current="page", and connect each link to your application’s real routing. The classes handle presentation; they do not supply page data or make every interaction accessible by themselves.

Bootstrap pagination example

This Bootstrap 5.3 pattern uses a semantic list inside a navigation landmark. Replace the illustrative query-string destinations with URLs or routes that your application actually handles.

As an Amazon Associate I earn from qualifying purchases.

<nav aria-label="Search results pages">
  <ul class="pagination">
    <li class="page-item">
      <a class="page-link" href="?page=1">Previous</a>
    </li>
    <li class="page-item">
      <a class="page-link" href="?page=1">1</a>
    </li>
    <li class="page-item active">
      <a class="page-link" href="?page=2" aria-current="page">2</a>
    </li>
    <li class="page-item">
      <a class="page-link" href="?page=3">3</a>
    </li>
    <li class="page-item">
      <a class="page-link" href="?page=3">Next</a>
    </li>
  </ul>
</nav>

The nav label distinguishes this navigation from other navigation regions on the page. The pagination, page-item, and page-link classes provide Bootstrap’s component styling. Your server or client application must still determine which pages exist and where each link leads. See the Bootstrap 5.3 pagination documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Mark the active page

Put active on the current page’s li.page-item for its visual state, and put aria-current="page" on that page’s link to identify it to assistive technology. Update both when the displayed page changes; styling alone does not convey the current page reliably.

Handle disabled Previous and Next controls

At the beginning or end of a result set, a Previous or Next action may not be available. Bootstrap notes that disabled styling on an anchor does not fully disable it for keyboard users: pointer-events affects pointer interaction, not keyboard navigation.

Use a non-interactive element when there is no destination

When the control should not be available, replace the anchor with a span and apply the disabled state:

<li class="page-item disabled">
  <span class="page-link">Previous</span>
</li>

This removes the link’s destination and keyboard focus. Choose this representation when users should not be able to activate the control.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep an anchor only when you also disable activation

If your markup needs to retain an anchor, add tabindex="-1" and use JavaScript to prevent activation while the control is disabled. The class alone is not a functional safeguard. Consult Bootstrap’s disabled pagination guidance for the documented approaches.

Use icon-only navigation accessibly

If Previous or Next is represented only by an icon, give the link an accessible name and hide a decorative glyph from assistive technology. Bootstrap’s documented pattern uses an aria-hidden="true" wrapper for the glyph and visually hidden text for the name. Do not leave an icon-only link without a name that communicates its action.

Choose size and alignment

Use the size modifier on the pagination list. Flexbox utilities can align the list within its container.

  • .pagination-sm makes the pagination smaller.
  • .pagination-lg makes it larger.
  • .justify-content-center centers it.
  • .justify-content-end aligns it to the end.

For example, <ul class="pagination pagination-sm justify-content-center"> combines a smaller size with centered alignment. These documented options are covered in the Bootstrap pagination component reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Customize pagination styling

Bootstrap 5.3 pagination uses local CSS variables, which you can override to adjust the component’s appearance. Sass customization is also supported. CSS variables were added in Bootstrap 5.2.0; consult the versioned component documentation for the variables and Sass options available to your build.

Version and accessibility scope

The Bootstrap v5.3 documentation reports version 5.3.8. Bootstrap states that its code is MIT-licensed and its documentation is CC BY 3.0. See the component documentation for pagination and the accessibility guidance for the broader caveat: accessibility depends substantially on the author’s markup, styling, and scripting. Evaluate the rendered component with your content and routing, including keyboard interaction and assistive technology; Bootstrap’s classes are a foundation, not a guarantee of accessible behavior.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.