Skip to content

Official government website An official website of the Federal Government of Nigeria

How you know
Federal Ministry of Communications, Innovation & Digital Economy Nigerian Design Standards

Data table

Rows and columns of data that people read and compare, like published figures, fees or office details. Not a dashboard or an admin tool.

Updated

Live example

Data table

Passport applications by office, September (example data)

Passport applications by office, September (example data)
Ikoyi Lagos 1,284 1,190 9
Garki FCT 1,102 1,047 7
Port Harcourt Rivers 876 812 11
Kano Kano 743 701 8
Enugu Enugu 512 488 6
Ibadan Oyo 498 455 10

Sorted by Applications, descending

Controls
Property Control What it does
Default, sortable or mobile
Says what the table shows
One column at a time

Overview

Use a data table when people need to compare values across rows or columns, like fees by passport type or waiting times by office. It’s for content pages, not dashboards or admin tools.

Use a data table for

  • Comparing values across rows and columns
  • Published figures people may quote
  • Fees, office details and waiting times

Don’t use a data table for

  • Laying out a page
  • One value per item (use a list)
  • Filters and pagination (a dashboard, not a content page)

Variants and states

Three variants: Default, Sortable and Mobile. In a sortable table each header is a button, with these states.

Unsorted

Both arrows: people can sort by this column.

Sorted

One arrow shows the direction. aria-sort says it in code.

Hover

A tint and an underline.

Focus

The focus ring on the header button.

Specifications

The properties of the data table. The same in HTML, WordPress and React.

Data table properties
Property Type Possible values Description
caption string
  • any text
Required. Says what the table shows, and when. It names the table.
variant string
  • default default
  • sortable
Mobile is automatic: below the tablet breakpoint the table scrolls sideways.
sortBy string
  • column key
Sortable only. Start sorted on a useful column.
download string
  • URL
Link to the full data. Offer it for tables over about 50 rows.

In code, use a <table> with a <caption>, <th scope="col"> for the header row and <th scope="row"> for the first column. Don’t use role="grid": this is a reading table. On small screens, wrap it in <div role="region" aria-labelledby tabindex="0"> so it can scroll sideways.

Tokens

Data table tokens and contrast
Part Token Contrast on the page
Container Caption · Title/medium · text/primary 17.6:1
Header row Body/medium-emphasized, with a 2px border/dark line under it 17.6:1
Cells Body/medium · text/primary · spacing/150 and spacing/200 17.6:1
Row lines border/default 1px 1.5:1, decorative
Sort arrows text/secondary for unsorted · text/primary for sorted 6.6:1 · 17.6:1
Focus ring Input Keyboard Focus · border/focus 3px 4.5:1

Use cases

Do

Not available [note 2]

Write “Not available” for a missing value, and add a note that says why.

Don’t

—

Don’t leave a cell blank, or use a dash or 0.

Layout

How a data table sits on a page.

Up to 720px
Most tables sit in the reading column.
Wider tables break out
More than about 6 columns use the full container, 1312 at desktop.
Scroll, don’t stack
On small screens it scrolls sideways, with a hint above it.
Keep your place
Fix the header row on long tables, and the first column when it scrolls.
Numbers right aligned
Tabular figures, with the same decimal places down a column.

Copywriting

How to write captions, headers and cells.

Always write a caption

“Passport fees by type, 2026”. Say what and when.

Units in the header

“Average wait (days)”, not “days” in every cell.

No empty cells

“Not available [note 2]”, never a blank, a dash or 0.

Notes in plain text

“[note 1]”, not superscript, so it survives copy and paste.

Source and date

Source: Nigeria Immigration Service. Last updated 30 September 2026.

Name the row in links

“Form A for Lagos”, not “Download” down the column.

Examples

Data table copywriting examples
Write Don’t write Why
Passport fees by type, 2026 Table 1 Says what and when.
Average wait (days) Average wait Gives the unit.
Not available [note 2] — Says why a value is missing.
Form A for Lagos Download Names the row.
Open A green dot Words, not colour alone.

Accessibility

A reading table, not a widget. Screen readers announce the row and column header with every value.

Keyboard interaction for sortable tables
Key What it does
Tab Moves through sortable header buttons, left to right. Cells are never focusable.
Shift + Tab Moves back.
Enter or Space On a header, sorts that column, or reverses it.
  • Use a native table with caption; don’t use role="grid" (WCAG 1.3.1).
  • Column headers use th scope="col"; row names use th scope="row" (WCAG 1.3.1).
  • The sorted column has aria-sort; icons differ by shape, not only colour (WCAG 1.4.1).
  • Announce sort changes with a polite live region (WCAG 4.1.3).
  • The scroll region is focusable so keyboard users can scroll it (WCAG 2.1.1, 1.4.10).

For developers

Copy the code for HTML, WordPress or React from the Code tab in Live example. The options are listed under Specifications.

For designers

Use Data table from 01 Library – Foundations. Pick Default or Sortable, and always write a caption.

References

Report a problem with this page