Alert

Use the alert when you need a site-wide banner for urgent or breaking messages above the main content.

Live demo

The Alert is a high-visibility banner for urgent or breaking information. People see it before the main page content. It can carry a short line plus optional longer detail, an optional link, and optional dismiss. It demands attention more strongly than a Toast, which is better for lightweight feedback.

Behaviour

The banner sits above the page so the message is hard to miss. Two visual tones help match seriousness: an urgent treatment for emergencies and time-sensitive warnings, and a calmer treatment for general breaking news when you still need prominence without the same alarm level.

When short and long copy both exist, people can use See more / See less to expand or collapse the longer text so the first line stays scannable. An optional link can sit behind the short message or appear as its own labelled action, depending on how you author it. An optional dismiss control lets people hide the banner for their session when the message does not need to stay fixed on screen.

Anatomy

Alert anatomy

  1. Icon and type: distinguishes emergency style from breaking news style at a glance.
  2. Primary message: the short line everyone sees first.
  3. Expanded detail: optional; revealed when See more is used.
  4. Link: optional action or destination.
  5. Dismiss: optional control to close the banner.

Content guidelines

Lead with a short first line that states the situation and what people should do or know. Put detail, nuance, and secondary facts in the long message or behind See more so the top of the banner stays readable on phones and in peripheral vision.

If you add a link, make the destination and label match the promise of the copy. Assume the message may be seen out of context (for example in feeds or shared links), so the short line should still make sense on its own.

Coordinate timing, wording, and retirement of the alert with your communications process so banners do not linger after an event is over.

Visibility and placement

The Alert is meant for site-wide or broad situations, not for routine page-level notes. It is usually placed in fixed areas of the experience (for example the top of the page) rather than dropped into arbitrary content zones. It may not appear in the same component picker as everyday layout blocks; placement is often handled by people who manage templates or global regions.

Whether the banner appears for a given page depends on authoring choices (for example turning display on) and on which page layout is in use. Some shared layouts always surface the alert so key messages stay aligned across those experiences.

When to use

  • Campus-wide or high-impact situations: safety, security, severe weather, or breaking news that should sit above normal content.
  • When you need a strong first line and optional depth without sending people to a separate page immediately.

When not to use

  • Inline or local notices tied to one block of content; consider Status bar or patterns inside the page body.
  • Long-form policy or reference text; use an article, detail page, or expandable content instead of a permanent banner.
  • Low-urgency reminders; use lighter patterns so you do not train people to ignore the alert.

Best practices

Do

  • Keep the short message tight and action-oriented.
  • Plan how and when the alert comes down after the event.
  • Test See more, links, and dismiss on mobile and with a realistic keyboard path.

Don't

  • Leave an alert enabled without an owner and a clear end state.
  • Pack the short line with everything; use the long message or See more for detail.

Related

Resource
Status barInline status strip; different role and semantics from Alert.
IconIcons used in the banner and controls.

LESS is scoped under #boot .c-alert. The inner .alert resets Bootstrap radius and border for a full-bleed bar. Two visual modes:

  • c-alert--emergency-alert: Red background (@color-alert-red), white text and links, white close icon on dismiss.
  • c-alert--breaking-news: Light grey background (#f0f0f0), black text, burgundy icon in the header.

Typography uses CDS body tokens (--cds-font-size-075, body font family). The See more control uses a chevron that rotates when .is-open.

Design tokens

SourceRole
@color-alert-redEmergency background.
@color-burgundyBreaking news icon colour.
--cds-font-size-075, body line heightsMain and toggle text.

Variants

  • Emergency vs breaking news (see Usage).
  • Dismissible: Bootstrap alert-dismissible plus custom close button styling for light vs dark backgrounds.
  • The header icon uses role="img" with a clear aria-label (“Emergency alert” or “Breaking news”).
  • See more: When active, the description region can use aria-live="assertive", which announces updates aggressively. Reserve this for genuinely important content.
  • See more moves focus to the description (tabindex="-1") after expanding so keyboard users land on the new text.
  • Dismiss: Close button has aria-label="Close" (English literal in JSP).

Rich text risk

  • Preview and full bodies are injected with innerHTML in alert.js. Authors should treat fields as trusted content; malicious markup would execute in the page context.

Testing

TestStatus
Screen reader: emergency vs breaking labelsRecommended
Keyboard: See more toggle, focus order, dismissRecommended
Live region noise when expanding copyReview per launch

WCAG / guidelines

Related

Resource
!AEMComponent: apps/concordia/components/alert; clientlib: apps.concordia.alert; xml.jsp for external XML consumers.

CRXDE Lite query

Use this query in CRXDE Lite to find instances of this component.

/jcr:root/content//*[@sling:resourceType = 'concordia/components/alert/alert.jsp']
  • Resource type: concordia/components/alert.
  • Sling: Extends foundation/components/parbase; allowed parents include parsys (see .content.xml).
  • Clientlib: apps.concordia.alert (CSS and JS); embedded from concordia master clientlibs for typical pages.
  • Picker: In the component definition the alert is grouped under .hidden, so it does not appear in the standard authoring picker; it is typically placed in fixed regions or header experiences by developers or administrators.

Implementation

File Purpose
apps/concordia/components/alert/alert.jsp Renders banner, link branching, aria-live when See more is used, dismiss markup, inline script calling cAlert.init.
apps/concordia/components/alert/dialog.xml Author-facing fields (enabled, text, textFull, link, linkLabel, allowDismiss).
apps/concordia/components/alert/xml.jsp Minimal XML payload (<page> with title, url, enabled) for external consumers (same link rewriting as HTML).
apps/concordia/components/alert/_cq_htmlTag/.content.xml Root class c-alert.
etc/designs/concordia/clientlibs/alert/less/alert.less Layout, colours, see-more chevron, close button.
etc/designs/concordia/clientlibs/alert/js/alert.js cAlert.init: toggles See more / See less, swaps innerHTML between preview and full blocks, moves focus.

Authoring fields

Field Property Purpose
Display this alert ./enabled When checked, the alert renders on normal pages (subject to template rules in alert.jsp).
Short message (required) ./text Primary copy; shown first and used as the “preview” when Long message exists.
Long message (optional) ./textFull If set (and different from short), See more / See less toggles between preview and full HTML in the description.
Link label (optional) ./linkLabel If Link is set: empty label wraps short message in the link; non-empty shows short message as text and link label as the anchor.
Link (optional) ./link Path field; rewritten to absolute URLs (see Behaviour below).
Show dismiss button ./allowDismiss Adds Bootstrap dismissible alert UI and close control.
Emergency vs breaking (often hidden in dialog) ./isEmergencyAlert Defaults to true (emergency / red). There is no visible field in dialog.xml for this in every deployment; changing to breaking news (grey) styling may require setting this property on the node (for example in CRXDE or a deployment-specific dialog).

Hidden dialog widgets (isSubsite, breakingNews) exist in dialog.xml but are not read by alert.jsp for variant selection; variant is driven by isEmergencyAlert.

Visibility rules

From alert.jsp, markup renders when:

  • enabled is true, or
  • The page uses template /apps/concordia/templates/concordia/shared/all (“shared page”), which forces the alert to render so shared experiences stay in sync.

Behaviour

  • See more: cAlert.init(instanceId, seeMoreLabel, seeLessLabel) runs on $(document).ready. Toggling copies HTML from hidden .c-alert__description--preview / --full into the visible paragraph; labels come from i18n in the JSP.
  • Links: Internal /content/… paths get .html when missing (except DAM). Additional string replacements map author paths to https://www.concordia.ca/… and related hosts so syndicated links stay absolute.
  • French path detection (/content/concordia/fr, /content/shared/fr) is present in the JSP but does not alter markup in the shown script (reserved or legacy).

Markup notes

  • aria-live="assertive" is applied to .c-alert__description only when See more is shown (displaySeeMore true).

Dependencies

  • jQuery (ready handler in alert.jsp).
  • Bootstrap alert dismissal when allowDismiss is true.
  • SVG sprite for icons.