The arXiv public-page header sets the tone for the entire platform: simple, straightforward, and utilitarian. It consists of a dark band with logo on the left, and navigation, search, and account links on the right. An optional, dismissible announcement banner can be displayed above the header. Absolute consistency across all pages is critical.
Internal pages have their own header and variations, see Modifiers for examples.
Rendered directly from design-system.css. Resize the window: at ≤599px the nav collapses behind the hamburger (the approved mobile treatment); without JS it wraps to a second row instead — every item stays visible, passing WCAG 1.4.10 reflow at 320px and keeping voice-control working. The header is static — it scrolls away with the page (the site header is never the sticky bar — DESIGN-POLICIES.md).
<!-- First focusable element on the page -->
<a class="ds-skip-link" href="#main">Skip to main content</a>
<header class="ds-site-header">
<a href="/" class="ds-site-header-logo" aria-label="archive home">
<img src="logo_arxiv-primary.svg" alt="archive">
</a>
<button type="button" id="ds-nav-toggle" class="ds-site-header-nav-toggle" aria-label="Open menu" aria-controls="ds-site-header-nav" aria-expanded="false">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
<line x1="3" y1="6" x2="21" y2="6"/>
<line x1="3" y1="12" x2="21" y2="12"/>
<line x1="3" y1="18" x2="21" y2="18"/>
</svg>
</button>
<nav class="ds-site-header-nav" id="ds-site-header-nav" aria-label="Main navigation">
<a href="/search">
<svg class="ds-nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
<circle cx="11" cy="11" r="8"/>
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
</svg>
Search
</a>
<a href="/submit">Submit</a>
<a href="/about/donate">Donate</a>
<span class="ds-site-header-divider" aria-hidden="true"></span>
<a href="/login" class="ds-site-header-login">Log in</a>
</nav>
</header>
href is the id of the main content.margin-right: auto. On arxiv.org it
is the logo image, never the word typed out; its alt text says “archive”.<nav> with an aria-label. The Search
control is an <a href="/search"> that JS may upgrade to open a search
overlay. Never a dead button — without JS it navigates to the search page.aria-hidden="true"; the label carries the name.aria-hidden="true"..is-collapsible to .ds-site-header and
wires the toggle (.is-open on the nav, aria-expanded in sync) in
the same call, so the hamburger appears only when it actually works. The default —
including no JS — is the wrap (all items visible, WCAG 1.4.10 reflow).<details>; it is documented with
the other disclosures on
Progressive disclosure.The bar's last item is the emphasis slot — the only nav item that takes weight. Signed out it says Log in. Signed in it says Account, with the greeting beside it.
<nav class="ds-site-header-nav" aria-label="Main navigation">
<a href="/search">
<svg class="ds-nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
<circle cx="11" cy="11" r="8"/>
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
</svg>
Search
</a>
<a href="/submit">Submit</a>
<span class="ds-site-header-divider" aria-hidden="true"></span>
<span class="ds-site-header-greeting">Welcome <b>Ada</b></span>
<a href="/account" class="ds-site-header-login">Account</a>
</nav>
.ds-skip-link is the first
focusable element on the page, visible only on keyboard focus, and it goes to the main
content.<nav>
with an aria-label, such as “Main navigation”, so a screen reader user can tell
it from the other landmarks on the page.scroll-padding duty applies.When arXiv has something to say to everyone, the announcement band sits directly above the bar, and the two scroll away together. The band itself, its registers and its tone are on Special messages; this page shows only where it sits.
<a class="ds-skip-link" href="#main">Skip to main content</a>
<div class="ds-announcement" role="region" aria-label="Announcement">
<img class="ds-announcement-glyph" src="icon_small-smileybones.svg" alt="">
<span class="ds-announcement-text">arXiv is now an independent nonprofit!</span>
<a class="ds-announcement-link" href="/about">Learn more</a>
<button type="button" class="ds-close">
<svg viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M18 6 6 18"/>
<path d="m6 6 12 12"/>
</svg>
<span class="is-sr-only">Dismiss announcement</span>
</button>
</div>
<header class="ds-site-header">…</header>
.ds-site-header and after the skip link. See
Special messages for its parts.A secondary property, like this documentation, differentiates itself from the main arXiv with a light header variant. Adding .ds-site-header--light re-points seven surface tokens but declares no property of its own. The token values are listed under Surface tokens.
The bar at the top of this page is the light variant, with dropdown groups.
<nav class="ds-site-header ds-site-header--light" aria-label="Design system">
<a href="/" class="ds-site-header-logo">arXiv Design System</a>
<nav class="ds-site-header-nav" aria-label="Site navigation">
<a href="/patterns">Patterns</a>
<a href="/mockups">Mockups</a>
<a href="/docs">Docs</a>
</nav>
</nav>
--ds-surface) with Library Grey links, Repository Brown emphasis, and a
Border Light bottom edge; the standard focus ring replaces the on-dark one.How the bar is coloured, and how a variant changes it.
.ds-site-header declares seven --ds-hdr-* tokens on itself: background,
text, emphasis text, hover, focus ring, bottom border and divider. Every rule in the bar reads one
of them, so a variant is a re-pointing of tokens and never a property override:
.ds-site-header--light sets all seven and nothing else. A property with its own
colours does the same.
The focus ring is the one to notice: the standard Link Blue ring is invisible against Repository Brown, so the dark surface needs its own. Because it is a token rather than a rule, a property that switches surface gets the correct ring without knowing that it needed to.