When arXiv has something special to say on the platform itself, this is how we do it. We are starting with a small announcement band above the header. Other options will be added as our communications team finds the need.
The announcement band is minimal but gets a lot of attention. Use sparingly to maintain its impact. If it is frequently deployed then our users will get used to it and tune it out. It sits above the site header as part of the header unit (full demo on the header reference page). The dismissal action persists across all repositories, but only for that particular banner. A new banner with a new message should display again for all users even if they dismissed the previous one.
Alert vs announcement? An alert belongs to the page’s content and is specific to that user’s journey. The announcement belongs to the site and is for all users.
<div class="ds-announcement" role="region" aria-label="Announcement">
<svg class="ds-announcement-glyph" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M3 11h3l9-7v16l-9-7H3z"/>
<path d="M19 8a5 5 0 0 1 0 8"/>
</svg>
<span class="ds-announcement-text">arXiv is now an independent nonprofit.</span>
<a class="ds-announcement-link" href="#">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>
role="region" and an aria-label so a screen
reader user can find it and skip it. Goes directly above .ds-site-header.aria-hidden="true", or an <img> with an empty
alt for one of the bones. Either way it is decoration; the sentence carries the
meaning.<a> with a real href.Announcement band messages must be concise and actionable, with a short link label. "Donate today" works because it is short and to the point. These examples do not work: "Click here" is not informative, and "Learn more about donating to arXiv" is too long.
role="region" and
aria-label="Announcement" on it. That is how a screen reader user finds the band
in the page’s landmarks, and how they skip it once they have read it.role="alert" or aria-live would make
every page announce it aloud, on every visit, before anything else.aria-hidden="true", or an empty alt), and the band’s
colour says nothing on its own. Read the sentence without the icon and the colour; it must
still make sense.<a> with an
href, so it works with JavaScript off and opens in a new tab if the reader wants.
Never a button that navigates..ds-close button needs its
<span class="is-sr-only">Dismiss announcement</span>. Do not use
title or aria-label for this; page translation tools skip
attributes.Icons are important for conveying meaning quickly and effectively. The small smileybones are drawn for this small use case. Each carries its own colours, so it goes in as an image, not as a true svg icon. No alt text needed, the icon is purely decorative and the text carries the meaning.
Smileybones
<img class="ds-announcement-glyph" src="assets/images/bones/icon_small-smileybones.svg" alt="">
Infinitybones
<img class="ds-announcement-glyph" src="assets/images/bones/icon_small-infinitybones.svg" alt="">
Errorbones
<img class="ds-announcement-glyph" src="assets/images/bones/icon_small-errorbones.svg" alt="">
Open Blue is our default banner color, and should be overridden sparingly. For messages that call for a different treatment, two color variations are available: Black for maintenance and service notices, 'Smileybones yellow' for events.
<div class="ds-announcement ds-announcement--maintenance" role="region" aria-label="Announcement">
<img class="ds-announcement-glyph" src="assets/images/bones/icon_small-errorbones.svg" alt="">
<span class="ds-announcement-text">arXiv will be closed for maintenance on January 1st</span>
<a class="ds-announcement-link" href="#">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>
<div class="ds-announcement ds-announcement--event" role="region" aria-label="Announcement">
<img class="ds-announcement-glyph" src="assets/images/bones/icon_small-smileybones.svg" alt="">
<span class="ds-announcement-text">We are celebrating 35 years of open science!</span>
<a class="ds-announcement-link" href="#">Join the party</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>