Page header
The top of a screen: an optional breadcrumb, the title, a description and actions that sit beside the title when there is room and wrap under it when not.
Live example
Order page
<header data-page-header>
<nav aria-label="Breadcrumb" data-breadcrumb>
<ol>
<li><a href="?view=sales">Sales</a></li>
<li><a href="?view=orders">Orders</a></li>
<li><a href="?order=1042" aria-current="page">Order 1042</a></li>
</ol>
</nav>
<h3>Order 1042</h3>
<p>Analytical Engines Ltd. · placed on 12 March 2025 · €1,240.00</p>
<div>
<a href="?order=1042&view=edit" data-button>Edit order</a>
<a href="?order=1042&view=print" data-button>Print</a>
<dui-menu>
<button type="button" popovertarget="order-more">More actions</button>
<div id="order-more" popover data-popover>
<button type="button">Duplicate order</button>
<button type="button">Create credit note</button>
<hr>
<button type="button">Cancel order</button>
</div>
</dui-menu>
</div>
</header>
List page
<header data-page-header>
<h3>Customers</h3>
<p>214 customers, 12 with an overdue invoice.</p>
<div>
<a href="?view=new-customer" data-button="primary">New customer</a>
<a href="?view=import-customers" data-button>Import</a>
</div>
</header>
Attributes
data-page-header on a <header> inside <main>: optional breadcrumb <nav>, heading, optional <p>, actions last
| Attribute or value | Where | Effect |
|---|---|---|
data-page-header | a <header> inside <main> | the page header |
<nav data-breadcrumb aria-label="Breadcrumb"> | optional, first child: the breadcrumb | |
<h1> | the title (h2 or h3 in a region) | |
<p> | optional, after the title: the description | |
<div>, role="toolbar" or <dui-menu> | optional, last child: the actions |
The top of a screen inside <main>: an optional breadcrumb, the page's <h1>, an optional one-line description, and the page's actions (buttons, a menu button). The actions sit beside the title when the header is at least 40rem wide and wrap under it when it is narrower, decided by a container query on the header itself, so it fits a full page, a split region or the main area of an app shell alike.
Our choice: the layout is chosen from the children's elements (a <nav> breadcrumb, a heading, a <p> description, and a last child holding the actions), not from extra attributes, so the markup is what any page would already write.
- Our choice: the page header takes its layout from its children's elements (a
<nav>breadcrumb, a heading, a<p>, and a last child of actions) rather than extra attributes, so it is the markup any page already writes;<header>inside<main>is not the banner landmark.
Breakpoint
40rem of the header's own inline size. A container query condition cannot read a custom property, so it is written as a length.
Accessibility
- HTML has no page header element and the APG has no pattern for one; <header> inside <main> is a plain grouping element, not the banner landmark.
- The heading is the page's one <h1>, after the breadcrumb in source order, so the breadcrumb (a named <nav>) is reached first and heading navigation lands on the title.
- The description is a plain <p>; reference it from the main content with aria-describedby only if it is needed to understand it.
- Actions keep source order after the title, so the Tab order matches the reading order in both layouts (WCAG 2.4.3), and keep their target size (36px, 32px compact, 44px on touch; WCAG 2.5.8).
- A <header> inside <main> has no landmark role.
Specifications
See also
- Organisms
- Component API convention
- Accessibility baseline
- Source:
css/components/organisms/page-header.css,examples/organisms/page-header.html - Demos: Orders view (Plain HTML, React, Angular, Astro, Vue, Svelte)
How other systems do it
For comparison only; these are not the standard this system follows.
- Apple Human Interface Guidelines: Toolbars
- Material Design 3: Top app bar
- Vercel Geist: No equivalent