@undrr/undrr-mangrove 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/components/BookCard.js +2 -2
- package/components/Breadcrumbs.js +2 -2
- package/components/Checkbox.js +2 -2
- package/components/Chips.js +2 -2
- package/components/CopyButton.js +2 -2
- package/components/CtaButton.js +2 -2
- package/components/Drawer.js +3 -3
- package/components/Drawer.js.LICENSE.txt +3 -1
- package/components/EmbedContainer.js +2 -2
- package/components/Footer.js +2 -2
- package/components/FormAction.js +2 -2
- package/components/FormErrorSummary.js +2 -2
- package/components/FormGroup.js +2 -2
- package/components/FullWidth.js +2 -2
- package/components/Gallery.js +3 -3
- package/components/Hero.js +3 -3
- package/components/HighlightBox.js +2 -2
- package/components/HorizontalBookCard.js +3 -3
- package/components/HorizontalBookCard.js.LICENSE.txt +3 -1
- package/components/HorizontalCard.js +3 -3
- package/components/HorizontalCard.js.LICENSE.txt +3 -1
- package/components/IconCard.js +3 -3
- package/components/IconCard.js.LICENSE.txt +3 -1
- package/components/Legend.js +2 -2
- package/components/Loader.js +3 -3
- package/components/MegaMenu.js +3 -3
- package/components/Notice.js +2 -2
- package/components/PageHeader.js +2 -2
- package/components/Pager.js +2 -2
- package/components/ProgressBar.js +9 -0
- package/components/ProgressBar.js.LICENSE.txt +9 -0
- package/components/QuoteHighlight.js +3 -3
- package/components/QuoteHighlight.js.LICENSE.txt +3 -1
- package/components/Radio.js +2 -2
- package/components/Range.js +2 -2
- package/components/ScrollContainer.js +2 -2
- package/components/SegmentedControl.js +2 -2
- package/components/Select.js +2 -2
- package/components/ServiceNotice.js +2 -2
- package/components/ShareButtons.js +3 -3
- package/components/ShowMore.js +3 -3
- package/components/SkipLink.js +2 -2
- package/components/StatsCard.js +3 -3
- package/components/StatsCard.js.LICENSE.txt +3 -1
- package/components/SyndicationSearchWidget.js +3 -3
- package/components/Tab.js +2 -2
- package/components/TextCta.js +3 -3
- package/components/TextCta.js.LICENSE.txt +3 -1
- package/components/TextInput.js +2 -2
- package/components/Textarea.js +2 -2
- package/components/Tree.js +2 -2
- package/components/UserFeedback.js +2 -2
- package/components/VerticalCard.js +3 -3
- package/components/VerticalCard.js.LICENSE.txt +3 -1
- package/components/hydrate.js +3 -3
- package/css/style-all.css +147 -128
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +147 -128
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +12 -12
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp.css +147 -128
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +147 -128
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +147 -128
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +147 -128
- package/css/style.css.map +1 -1
- package/docs/EDITORIAL-MANUAL.md +193 -0
- package/docs/llms-editorial-manual.txt +200 -0
- package/docs/llms-motion.txt +125 -0
- package/docs/llms-page-building.txt +1140 -0
- package/docs/llms-search-widget.txt +765 -0
- package/error-pages/401.html +1 -1
- package/error-pages/403.html +1 -1
- package/error-pages/404.html +1 -1
- package/error-pages/429.html +1 -1
- package/error-pages/500.html +1 -1
- package/error-pages/502.html +1 -1
- package/error-pages/503.html +1 -1
- package/error-pages/504.html +1 -1
- package/error-pages/5xx.html +1 -1
- package/error-pages/challenge.html +1 -1
- package/error-pages/managed-challenge.html +1 -1
- package/js/cite-this.js +994 -0
- package/js/on-this-page-nav.js +80 -1
- package/js/show-more.js +149 -21
- package/package.json +6 -1
- package/scss/Atom/BaseTypography/Abbr/abbr.scss +1 -1
- package/scss/Atom/BaseTypography/Blockquote/blockquote.scss +1 -1
- package/scss/Atom/BaseTypography/Cite/cite.scss +1 -1
- package/scss/Atom/BaseTypography/Code/code.scss +1 -1
- package/scss/Atom/BaseTypography/Mark/mark.scss +1 -1
- package/scss/Atom/BaseTypography/Quotation/quotation.scss +1 -1
- package/scss/Atom/BaseTypography/Small/small.scss +1 -1
- package/scss/Atom/Colors/color.scss +1 -1
- package/scss/Atom/EmptyState/empty-state.scss +1 -1
- package/scss/Atom/Icons/_icon-definitions.scss +35 -3
- package/scss/Atom/Icons/icons.scss +1 -1
- package/scss/Atom/Images/AuthorImage/author-image.scss +10 -3
- package/scss/Atom/Images/Image/image.scss +1 -1
- package/scss/Atom/Images/ImageCaptionCredit/image-caption-credit.scss +7 -2
- package/scss/Atom/Images/ImageCredit/image-credit.scss +1 -1
- package/scss/Atom/Layout/Container/container.scss +1 -1
- package/scss/Atom/Layout/Grid/grid.scss +1 -1
- package/scss/Atom/Layout/Spacing/spacing.scss +1 -1
- package/scss/Atom/Logo/logo.scss +1 -1
- package/scss/Atom/Navigation/Breadcrumb/breadcrumb.scss +1 -1
- package/scss/Atom/Navigation/MenuItems/menu-items.scss +1 -1
- package/scss/Atom/ReachElement/Details/details.scss +5 -3
- package/scss/Atom/ReachElement/Figcaption/figcaption.scss +1 -1
- package/scss/Atom/StatusLabel/status-label.scss +1 -1
- package/scss/Atom/Table/table.scss +1 -1
- package/scss/Atom/Tag/tag.scss +1 -1
- package/scss/Atom/Video/video.scss +1 -1
- package/scss/Components/Boilerplate/boilerplate.scss +1 -1
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -1
- package/scss/Components/Buttons/Chips/chips.scss +1 -1
- package/scss/Components/Buttons/CopyButton/copy-button.scss +1 -1
- package/scss/Components/Buttons/CtaButton/buttons.scss +1 -1
- package/scss/Components/Buttons/CtaButton/cta-button.scss +1 -1
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +90 -1
- package/scss/Components/Cards/Card/card.scss +9 -3
- package/scss/Components/Cards/StatsCard/stats-card.scss +9 -2
- package/scss/Components/CiteThis/cite-this.scss +339 -0
- package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +1 -1
- package/scss/Components/DataViz/Legend/legend.scss +1 -1
- package/scss/Components/ErrorPages/error-pages.scss +1 -1
- package/scss/Components/Footer/footer.scss +1 -1
- package/scss/Components/Forms/Checkbox/checkbox.scss +1 -1
- package/scss/Components/Forms/FormAction/form-action.scss +1 -1
- package/scss/Components/Forms/FormGroup/form-group.scss +1 -1
- package/scss/Components/Forms/InputFields/input-fields.scss +1 -1
- package/scss/Components/Forms/Radio/radio.scss +1 -1
- package/scss/Components/Forms/Range/range.scss +1 -1
- package/scss/Components/Forms/SegmentedControl/segmented-control.scss +1 -1
- package/scss/Components/Forms/Select/select.scss +1 -1
- package/scss/Components/Forms/TextInput/text-input.scss +1 -1
- package/scss/Components/Forms/Textarea/textarea.scss +1 -1
- package/scss/Components/Forms/_form-base.scss +1 -1
- package/scss/Components/Gallery/gallery.scss +41 -16
- package/scss/Components/Hero/hero.scss +166 -1
- package/scss/Components/HighlightBox/highlight-box.scss +1 -1
- package/scss/Components/MegaMenu/mega-menu.scss +43 -122
- package/scss/Components/MegaMenu/megamenu.scss +1 -1
- package/scss/Components/Navigation/Drawer/drawer.scss +11 -1
- package/scss/Components/Navigation/Tree/tree.scss +1 -1
- package/scss/Components/Notice/notice.scss +1 -1
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +109 -4
- package/scss/Components/PageHeader/page-header.scss +1 -1
- package/scss/Components/Pager/pager.scss +1 -1
- package/scss/Components/PreviewAccess/preview-access.scss +1 -1
- package/scss/Components/ProgressBar/progress-bar.scss +215 -0
- package/scss/Components/QuoteHighlight/quote-highlight.scss +1 -1
- package/scss/Components/ScrollContainer/scroll-container.scss +1 -1
- package/scss/Components/Snackbar/snackbar.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/_deprecated-teaser-hide.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +253 -128
- package/scss/Components/Tab/tab.scss +3 -2
- package/scss/Components/TableOfContents/table-of-contents.scss +1 -1
- package/scss/Components/TextCta/text-cta.scss +1 -1
- package/scss/Components/TextCta/textcta.scss +1 -1
- package/scss/Components/UserFeedback/user-feedback.scss +1 -1
- package/scss/Molecules/ImageCaption/image-caption.scss +17 -3
- package/scss/Molecules/SectionHeader/section-header.scss +1 -1
- package/scss/Molecules/SectionHeader/sectionheader.scss +1 -1
- package/scss/Patterns/HubHeader/hub-header.scss +1 -1
- package/scss/Patterns/RichContent/rich-content.scss +177 -0
- package/scss/Patterns/_shared/pattern-demo.scss +6 -1
- package/scss/Utilities/EmbedContainer/embed-container.scss +1 -1
- package/scss/Utilities/FullWidth/full-width.scss +1 -1
- package/scss/Utilities/Loader/loader.scss +133 -12
- package/scss/Utilities/Normalize/normalize.scss +1 -1
- package/scss/Utilities/PagePatterns/page-patterns.scss +1 -1
- package/scss/Utilities/ShowMore/show-more.scss +7 -1
- package/scss/Utilities/SkipLink/skip-link.scss +1 -1
- package/scss/assets/scss/_components.scss +5 -0
- package/scss/assets/scss/_foundational.scss +23 -8
- package/scss/assets/scss/_mixins.scss +5 -0
- package/scss/assets/scss/_variables.scss +2 -2
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Mangrove editorial manual
|
|
2
|
+
|
|
3
|
+
> Mechanical style rules (capitalization, punctuation, numbers and dates, abbreviations, italics, spelling), UNDRR-specific terminology, plus disability inclusive and gender-inclusive language for UNDRR web content (news, publications, blogs, events, landing pages) and for Mangrove UI copy, component docs and Storybook pages. Each rule is credited to its source: the UNDRR Publications SOP, the UN Geneva Web Style Guide, the United Nations Editorial Manual, the United Nations Disability-Inclusive Communications Guidelines or the DPI Gender Checklist for Content Creators; see the "Keeping this updated" section below for the full source list and priority order.
|
|
4
|
+
|
|
5
|
+
> **About this guidance:** this page brings together guidance maintained elsewhere and is provided for reference and ease of access. It is not the authoritative source. Where it differs from a source, or doesn't cover a point, follow the source: the [UNDRR Publications SOP](https://unitednations.sharepoint.com/sites/UNDRR-DRR-COMMS/SitePages/Publications.aspx) (UNDRR staff only), the [United Nations Editorial Manual](https://www.un.org/dgacm/en/content/editorial-manual), the [UN Geneva Web Style Guide](https://www.ungeneva.org/en/styleguide), the [United Nations Disability-Inclusive Communications Guidelines](https://www.un.org/sites/un2.un.org/files/un_disability-inclusive_communication_guidelines.pdf) and the DPI Gender Checklist for Content Creators, in the priority order set out in [Keeping this updated](#keeping-this-updated).
|
|
6
|
+
|
|
7
|
+
This guide covers mechanical style rules (capitalization, punctuation, numbers and dates, abbreviations, italics, spelling, UNDRR-specific terminology, disability inclusive language and gender-inclusive language) for UNDRR web content (news, publications, blogs, events and landing pages) and for UI copy, component docs, Storybook pages, developer docs and changelogs. It is derived from, and credits, five sources, each fetched and checked against this doc on **23 September 2026**. See [Keeping this updated](#keeping-this-updated) for when to re-check.
|
|
8
|
+
|
|
9
|
+
- **UNDRR Publications SOP** (internal, UNDRR Communications team; `SOP_Publication-2026.docx`, fetched 23 September 2026): the house style UNDRR uses for its own publications. Authoritative for anything UNDRR-specific: named entities (Sendai Framework targets/priorities/indicators, GAR, campaigns), terminology conventions and gender language choices. Not public; UNDRR staff can find the current version on the [UNDRR Publications page](https://unitednations.sharepoint.com/sites/UNDRR-DRR-COMMS/SitePages/Publications.aspx) (UNDRR staff only), and others can ask the Communications team.
|
|
10
|
+
- [UN Geneva Web Style Guide](https://www.ungeneva.org/en/styleguide) (fetched 23 September 2026): written for web content; the primary reference for general web/UI mechanics not covered by the SOP.
|
|
11
|
+
- [United Nations Editorial Manual](https://www.un.org/dgacm/en/content/editorial-manual) (fetched 23 September 2026): written for formal United Nations documents; used as a fallback where neither of the above covers a case, and adapted for web/UI where a document-writing rule doesn't translate directly. The UNDRR Publications SOP itself is built on this manual.
|
|
12
|
+
- [United Nations Disability-Inclusive Communications Guidelines](https://www.un.org/sites/un2.un.org/files/un_disability-inclusive_communication_guidelines.pdf) (Department of Global Communications, March 2022; fetched 23 September 2026): authoritative for disability inclusive language and terminology specifically. Its own terminology table is itself sourced from the Disability-Inclusive Language Guidelines of the United Nations Office at Geneva.
|
|
13
|
+
- **DPI Gender Checklist for Content Creators** (Focal Points for Women and Gender, Department of Public Information, 2018; not confirmed to have a stable public URL, so a copy was provided directly and checked 23 September 2026): a one-page checklist for editorial teams; only its word-level "Check your words" guidance is in scope here. The rest of the checklist (narrative balance, image diversity, quantitative speaking-time checks) is content-strategy guidance for editorial teams producing stories, photography and video, not a mechanical style rule for a component library, so it isn't reproduced in this doc.
|
|
14
|
+
|
|
15
|
+
For guidance on writing each type of UNDRR web content (news, events, publications and blogs), see the [UNDRR editorial guides](https://assets.undrr.org/docs/editorial-guides/README.md); this manual covers the mechanics they share. For UX writing principles (plain language, inclusive language, front-loading, writing for two audiences), see [Writing guidelines](https://mangrove.undrr.org/?path=/docs/contributing-writing-guidelines--docs) instead. This doc doesn't repeat those. For writing principles beyond mechanics (purpose, audience, clarity, diplomatic language) across United Nations text types, see [A Handbook for Writers of the United Nations (PDF)](https://languages.un.org/sites/default/files/2024-01/writing_for_the_united_natons_a_handbook_of_guidelines_techniques_and_resources.pdf).
|
|
16
|
+
|
|
17
|
+
## Where these rules apply
|
|
18
|
+
|
|
19
|
+
The UNDRR Publications SOP and the United Nations Editorial Manual are written for publications and formal documents. Their rules apply to long-form content (reports, articles, page body copy) and to interface microcopy (button labels, error and status messages, form help text) alike. Where a print rule doesn't translate to the web, the rule says so and gives the web/UI equivalent, as for list punctuation and italics.
|
|
20
|
+
|
|
21
|
+
Everything users see must follow these rules: news, publications, blogs, events and other page content on UNDRR websites, component copy, default labels and messages, static templates and Storybook content written for UNDRR audiences. Mangrove's own developer docs and changelogs follow them too. Older developer docs are being brought in line gradually rather than in one sweep, so fix what you touch.
|
|
22
|
+
|
|
23
|
+
## Where UNDRR style differs from United Nations style
|
|
24
|
+
|
|
25
|
+
UNDRR largely follows the United Nations Editorial Manual, but its Publications SOP makes a few deliberate exceptions. They are easy to get "wrong" by following general United Nations guidance, so each one is listed here with the reason. Where the two disagree, UNDRR content follows the SOP.
|
|
26
|
+
|
|
27
|
+
| Topic | United Nations Editorial Manual | UNDRR (Publications SOP) |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Percentages | "25 per cent" in running text | "25%", with no space; "Twenty-five per cent" only at the start of a sentence |
|
|
30
|
+
|
|
31
|
+
**Percentages, why:** the SOP sets "%" as UNDRR house style without giving a reason. It matches the UN Geneva Web Style Guide ("1% increase"), which is written for web content, and it keeps figures compact in the stat cards, charts and data-heavy copy UNDRR publishes. Older UNDRR guidance, including early Copilot guidance files, said "per cent" because it followed the United Nations Editorial Manual; that is superseded.
|
|
32
|
+
|
|
33
|
+
## Capitalization
|
|
34
|
+
|
|
35
|
+
- **Page and heading titles**: sentence case, capitalizing only the first word and proper nouns. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide)) This matches Mangrove's existing "sentence case for all headings and titles" rule in [Writing guidelines](https://mangrove.undrr.org/?path=/docs/contributing-writing-guidelines--docs).
|
|
36
|
+
- **After a colon in titles and headings**: follow the United Nations Editorial Manual, which decides by type of title.
|
|
37
|
+
- **Headings and titles UNDRR writes** (page and section headings, news, event and blog titles) **and titles of United Nations documents**: lower case after the colon, unless the next word is a proper noun: "Message for World Tsunami Awareness Day 2025: sustained investment in preparedness". ([United Nations Editorial Manual, Headings](https://www.un.org/dgacm/en/content/editorial-manual/headings); [UN Geneva style guide, Punctuation](https://www.ungeneva.org/en/styleguide))
|
|
38
|
+
- **Titles of publications**, wherever they appear, including the title of a publication's web page: capitalize the main words of the title and the first word of the subtitle: "GAR Special Report 2024: Forensic Insights for Future Resilience". ([United Nations Editorial Manual, Footnotes and citations: publications](https://www.un.org/dgacm/en/content/editorial-manual/footnotes/chap-02))
|
|
39
|
+
- **Menu items and nav labels**: capitalize each major word (skip articles, conjunctions, prepositions). This is the one case where UN Geneva's web guide departs from sentence case, so use it specifically for menu/nav-style labels, not page headings. un.org follows the same convention, and the MegaMenu story data already does. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide))
|
|
40
|
+
- **Buttons, card links, captions**: capitalize the first word and proper nouns only, same as page headings. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide))
|
|
41
|
+
- **Table cells**: capitalize the first word in every cell. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide))
|
|
42
|
+
- **Generic terms stay lowercase** unless they're part of an official name: "press release" and "human rights" are lowercase; "Summit of the Future" is capitalized because it names a specific event. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide))
|
|
43
|
+
- **Titles/roles are capitalized only when concrete**, not generic: "the Director's" role and office are lowercase in general reference; "Project Director, Strategic Heritage Plan" is capitalized as an actual title. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide); [United Nations Editorial Manual, Capitalization](https://www.un.org/dgacm/en/content/editorial-manual/capitalization))
|
|
44
|
+
- **Small-letter proper nouns and product names stay lowercase even at the start of a heading**, for example `e-subscription` and `iSeek`. In component names and prop values, this means don't force-capitalize a brand or product string that's deliberately lowercase-led. ([UN Geneva style guide, Capitalization](https://www.ungeneva.org/en/styleguide))
|
|
45
|
+
|
|
46
|
+
## Punctuation
|
|
47
|
+
|
|
48
|
+
- **Colon and semicolon**: no space before them; continue with a lower-case letter after. ([UN Geneva style guide, Punctuation](https://www.ungeneva.org/en/styleguide)) In titles and headings, see [after a colon](#capitalization) for when a capital follows.
|
|
49
|
+
- **Comma**: no serial (Oxford) comma before "and" in a simple list: "organs, organizations and bodies", not "organs, organizations, and bodies". ([United Nations Editorial Manual, Punctuation](https://www.un.org/dgacm/en/content/editorial-manual/punctuation))
|
|
50
|
+
- **Ampersand (`&`)**: fine in UI chrome (buttons, menu items) but avoid in running text unless it's part of a title; put a space on both sides. ([UN Geneva style guide, Punctuation](https://www.ungeneva.org/en/styleguide))
|
|
51
|
+
- **Slash (`/`)**: no space on either side when used to separate words. The United Nations Editorial Manual goes further for prose and discourages it outright in favour of "and"/"or" since its meaning is unclear. Apply that stricter rule in component prop docs and error copy, where ambiguity is costly. ([UN Geneva style guide, Punctuation](https://www.ungeneva.org/en/styleguide); [United Nations Editorial Manual, Punctuation](https://www.un.org/dgacm/en/content/editorial-manual/punctuation))
|
|
52
|
+
- **Full stop at the end of UI text**: skip it for short style elements (accordion headings, button/link text, list items in short lists) unless the item is a full sentence. Do use one to end running text/body copy. Never end a link or button with a full stop or exclamation mark unless it's the end of a complete sentence in running text. ([UN Geneva style guide, Punctuation](https://www.ungeneva.org/en/styleguide) and [Links](https://www.ungeneva.org/en/styleguide))
|
|
53
|
+
- **Quotation marks**: use only for actual quotes, not to "flag" a word. A full stop goes inside the closing quotation mark only if the entire sentence is inside the quote; otherwise it goes outside. ([UN Geneva style guide, Punctuation](https://www.ungeneva.org/en/styleguide)) The UNDRR Publications SOP allows one specific exception: double quotation marks around a specialized term the first time it's introduced (e.g. defining "residual risk" in body copy or a glossary entry). That's the only UI case where quoting a single word is correct; don't extend it to ordinary emphasis. (UNDRR Publications SOP, Quotations)
|
|
54
|
+
- **En dash (`–`)**: use it where the United Nations Editorial Manual does. Number/year/date ranges (`2–4%`, `2015–2030`, `11–13 December`) and joined pairs (`cost–benefit ratio`) take an unspaced en dash, not a hyphen, as in the official title of the Sendai Framework for Disaster Risk Reduction 2015–2030. In running text, "from 2015 to 2030" also works. A spaced en dash can mark an interruption in thought (`The way in which such changes – including hazard intensity – affect human activity...`), but a comma, colon or parentheses usually reads just as well, so use it sparingly. ([United Nations Editorial Manual, Punctuation](https://www.un.org/dgacm/en/content/editorial-manual/punctuation) and [Numbers, dates and time](https://www.un.org/dgacm/en/content/editorial-manual/numbers-dates-time); UNDRR Publications SOP, Punctuation)
|
|
55
|
+
- **No em dashes (`—`)**: United Nations style uses a spaced en dash where other styles use an em dash, and Mangrove prefers a comma, colon or parentheses in most of those places. ([United Nations Editorial Manual, Punctuation](https://www.un.org/dgacm/en/content/editorial-manual/punctuation))
|
|
56
|
+
- **No dashes as separators in structured text**: changelog entries, labels and metadata lines use a comma or colon (`- **1.4.3**, 2026-09-17 ([#1190](url)): Description`), not a dash. Dashes there add nothing and are easily mangled by systems with the wrong character encoding. When a full sentence follows such a label, as in a changelog entry, it starts with a capital letter; a short fragment ("[Writing guidelines](https://mangrove.undrr.org/?path=/docs/contributing-writing-guidelines--docs): UX writing principles") stays lower case, as after any colon. (Mangrove convention)
|
|
57
|
+
- **No apostrophe on an abbreviation's plural**: `NGOs`, not `NGO's`. (UNDRR Publications SOP, Punctuation)
|
|
58
|
+
- **Lists**: no punctuation after short list items; a full stop after each item only if items are full sentences; never a semicolon between items in UI lists; no "and"/"or" tacked onto the last item; capitalize an item's first word only if the item is a full sentence. ([UN Geneva style guide, Lists](https://www.ungeneva.org/en/styleguide)) The UNDRR Publications SOP uses a semicolon between items for print/document lists. That's a print convention for long-form documents, not the UI rule above; don't apply it to Mangrove component lists.
|
|
59
|
+
|
|
60
|
+
## Numbers and dates
|
|
61
|
+
|
|
62
|
+
- **Words vs. figures**: spell out numbers below 10 ("eight children"); use figures from 10 up, and always use figures for percentages, decimals, ratios, measurements, temperatures, money, ages and voting results (e.g. "1% increase", "10.5°C", "USD 6.50", "15 votes to none"). ([UN Geneva style guide, Numbers, dates & times](https://www.ungeneva.org/en/styleguide); [United Nations Editorial Manual, Numbers, dates and time](https://www.un.org/dgacm/en/content/editorial-manual/numbers-dates-time))
|
|
63
|
+
- **Large numbers**: pair millions/billions/trillions with a decimal numeral: "1.5 million", not "1,500,000" in running copy. ([UN Geneva style guide, Numbers, dates & times](https://www.ungeneva.org/en/styleguide)) Where a figure is shown in full rather than abbreviated (a table cell, a stat card), use a comma for four digits or more ("1,000", "12,452") and always a decimal point, never a decimal comma. (UNDRR Publications SOP, Numbers, dates and time)
|
|
64
|
+
- **Percentages**: figure directly followed by `%` with no space ("25%"), except at the start of a sentence, where both are spelled out: "Twenty-five per cent". This is a deliberate UNDRR difference from the United Nations Editorial Manual, which writes "per cent"; see [Where UNDRR style differs from United Nations style](#where-undrr-style-differs-from-united-nations-style). (UNDRR Publications SOP, Numbers, dates and time)
|
|
65
|
+
- **Space between a number and its unit**: `10 cm`, `2 m`, `4 kg`. A space always separates them, except the percentage and degree symbols, which are closed up to the number (`25%`, `1.5°C`, `90°N`). This is a common miss in stat cards and measurement labels. (UNDRR Publications SOP, Numbers, dates and time; United Nations Editorial Manual, Numbers, dates and time)
|
|
66
|
+
- **Dates**: day, then month spelled out, then year, no punctuation: "12 January 2026", not "Jan 12, 2026" or "12/01/2026". This matches Mangrove's existing "10 October 2025" example in [Writing guidelines](https://mangrove.undrr.org/?path=/docs/contributing-writing-guidelines--docs); this doc gives the rule behind that example. ([UN Geneva style guide, Numbers, dates & times](https://www.ungeneva.org/en/styleguide))
|
|
67
|
+
- **Decades**: "the 1990s", with no apostrophe. ([United Nations Editorial Manual, Numbers, dates and time](https://www.un.org/dgacm/en/content/editorial-manual/numbers-dates-time))
|
|
68
|
+
- **Time**: 12-hour clock, `a.m.`/`p.m.`, a point (not a colon) between hours and minutes, no minutes shown on the hour: "9 a.m.", "8.30 p.m.". A UI component showing a machine-readable timestamp (e.g. a `<time>` element's `datetime` attribute) should still use ISO 8601 internally; this rule is for the human-readable label. ([UN Geneva style guide, Numbers, dates & times](https://www.ungeneva.org/en/styleguide))
|
|
69
|
+
- **Currencies**: write the currency name in full if it appears only once or twice; otherwise give the full name at first mention (always, for a less familiar currency) and the three-letter code after that ("Swiss francs", then "CHF"). United States dollars can be written as "USD" or "US$"; pick one per piece of content. Avoid a bare "$", which is ambiguous for an international audience. (UNDRR Publications SOP, Country names and currencies)
|
|
70
|
+
- **Avoid relative date references** ("this year", "last month") in copy that might be read outside its original context (cached pages, exported PDFs, translated content). Use the specific date or year instead. ([United Nations Editorial Manual, Numbers, dates and time](https://www.un.org/dgacm/en/content/editorial-manual/numbers-dates-time))
|
|
71
|
+
|
|
72
|
+
## Abbreviations
|
|
73
|
+
|
|
74
|
+
- **Use sparingly**: a UI dense with unfamiliar abbreviations is harder to scan, not easier. ([UN Geneva style guide, Abbreviations](https://www.ungeneva.org/en/styleguide))
|
|
75
|
+
- **Spell out on first use, abbreviation in parentheses after**, for example "United Nations Office for Disaster Risk Reduction (UNDRR)", and only introduce the abbreviation if it's actually used again later in the same content. ([UN Geneva style guide, Abbreviations](https://www.ungeneva.org/en/styleguide))
|
|
76
|
+
- **No periods in abbreviations**: "UNDRR", not "U.N.D.R.R.". ([United Nations Editorial Manual, Abbreviations](https://www.un.org/dgacm/en/content/editorial-manual/abbreviations))
|
|
77
|
+
- **Don't abbreviate in headings or titles.** ([United Nations Editorial Manual, Abbreviations](https://www.un.org/dgacm/en/content/editorial-manual/abbreviations))
|
|
78
|
+
- **Units of measure abbreviate without periods**: `cm`, `kg`, `km`, `ha`, `kW` and data units like `GB`/`TB`. ([United Nations Editorial Manual, Abbreviations](https://www.un.org/dgacm/en/content/editorial-manual/abbreviations))
|
|
79
|
+
- **Spell out "United Nations" in full in running text**: don't shorten it to "UN" in a sentence, including inside otherwise-abbreviated UI copy. Official names that contain "UN" (UN Women, UN-Habitat, UN Geneva) keep their own form. (UNDRR Publications SOP, Abbreviations and acronyms)
|
|
80
|
+
- **No "the" before an abbreviation or acronym, and never a possessive form of one**: not "the UNDRR", not "UNDRR's mandate". Rephrase instead: "the mandate of UNDRR". (UNDRR Publications SOP, Abbreviations and acronyms)
|
|
81
|
+
- **Avoid "e.g.", "i.e." and "etc." in running text**: spell out "for example" / "that is" / "and so on", or move the aside into a parenthetical or footnote where the Latin abbreviations are acceptable. (UNDRR Publications SOP, Abbreviations and acronyms)
|
|
82
|
+
|
|
83
|
+
## Italics and emphasis
|
|
84
|
+
|
|
85
|
+
The United Nations Editorial Manual's italics rules are written for print/PDF documents; the web/UI equivalents below translate them for HTML and component docs:
|
|
86
|
+
|
|
87
|
+
- **Titles of published works** (books, publications, periodicals, films) → italicize with `<em>` or Markdown `_..._` in running text and docs prose. ([United Nations Editorial Manual, Italics and bold print](https://www.un.org/dgacm/en/content/editorial-manual/italics))
|
|
88
|
+
- **Foreign words not in general English use** → italicize; a word common enough to appear in the online Oxford Dictionary (or the Editorial Manual's own spelling list) doesn't need it. ([United Nations Editorial Manual, Italics and bold print](https://www.un.org/dgacm/en/content/editorial-manual/italics))
|
|
89
|
+
- **Scientific names** (genus/species) → italicize, including a species name rendered in a data-viz label or table cell. ([United Nations Editorial Manual, Italics and bold print](https://www.un.org/dgacm/en/content/editorial-manual/italics))
|
|
90
|
+
- **Italics are never used for emphasis** in either source, whether in prose or UI copy. For UI emphasis, use a `<strong>`/bold treatment sparingly (see below), a callout/notice component or better copy that doesn't need typographic emphasis at all. ([United Nations Editorial Manual, Italics and bold print](https://www.un.org/dgacm/en/content/editorial-manual/italics); [UN Geneva style guide, Formatting content](https://www.ungeneva.org/en/styleguide))
|
|
91
|
+
- **Non-English organization names are never italicized.** ([United Nations Editorial Manual, Italics and bold print](https://www.un.org/dgacm/en/content/editorial-manual/italics))
|
|
92
|
+
- **Bold** is reserved for references to official United Nations documents, labels/categories, subheadings and sparing highlighted text, not general emphasis. ([UN Geneva style guide, Formatting content](https://www.ungeneva.org/en/styleguide))
|
|
93
|
+
- **Underline** is reserved for subheadings and introducing named entities, never for emphasizing running text (and on the web, avoid it outright outside of links, since an underline reads as a link affordance). ([UN Geneva style guide, Formatting content](https://www.ungeneva.org/en/styleguide))
|
|
94
|
+
- **No ALL CAPS** for emphasis anywhere in content. Where a design system displays a label in caps (e.g. a `text-transform: uppercase` chip or eyebrow style), the *authored* copy is still written in sentence case; the transform is presentation, not content. ([UN Geneva style guide, Formatting content](https://www.ungeneva.org/en/styleguide))
|
|
95
|
+
|
|
96
|
+
## Spelling
|
|
97
|
+
|
|
98
|
+
This is the section most likely to catch out a contributor, since these terms come up in real UNDRR UI copy and docs.
|
|
99
|
+
|
|
100
|
+
- **Base dictionary**: British English, per the online Oxford Dictionary, the same standard [Writing guidelines](https://mangrove.undrr.org/?path=/docs/contributing-writing-guidelines--docs) already assumes. This covers user-facing copy and docs prose; code identifiers, CSS properties and API names keep their own spelling (`color`, `center`). ([United Nations Editorial Manual, Spelling](https://www.un.org/dgacm/en/content/editorial-manual/spelling))
|
|
101
|
+
- **"organization", "organize"**: `-ize`/`-ization`, not `-ise`/`-isation` (Oxford spelling, not the `-ise` British spelling some other UK style guides use). Exceptions that always take `-yse`: "analyse", "catalyse". ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide); UNDRR Publications SOP, Spellings)
|
|
102
|
+
- **"programme"** for a plan of activities (the programmes UNDRR runs, funding programmes), reserving "program" only for software. ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide))
|
|
103
|
+
- **"Member State"/"Member States"** capitalized when referring to United Nations Member States; lowercase "state"/"states" otherwise. ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide))
|
|
104
|
+
- **"email"**: one word, no hyphen (an explicit exception to the general "e-" prefix hyphenation rule). ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide))
|
|
105
|
+
- **"website", "web page"**: one word for "website", two for "web page". ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide))
|
|
106
|
+
- **"human rights"**, **"civil society organization" (CSO)**, **"fundamental freedoms"**: lowercase as general terms. ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide))
|
|
107
|
+
- **"disability inclusion", "disability inclusive language"**: lowercase, no hyphen in either. Formal titles keep their own form ("United Nations Disability-Inclusive Communications Guidelines"). ([UN Geneva style guide, Spelling](https://www.ungeneva.org/en/styleguide))
|
|
108
|
+
- **Fractions in prose**: words, no hyphen ("one third of the total"), except when used as a compound adjective, which does take a hyphen: "a one-third share". ([United Nations Editorial Manual, Spelling](https://www.un.org/dgacm/en/content/editorial-manual/spelling))
|
|
109
|
+
- **`-ly` adverb + adjective compounds are never hyphenated**: "environmentally sustainable growth", not "environmentally-sustainable growth". This is a common one to get wrong in marketing-style card copy. ([United Nations Editorial Manual, Spelling](https://www.un.org/dgacm/en/content/editorial-manual/spelling))
|
|
110
|
+
|
|
111
|
+
> **Note:** The UN Geneva style guide's spelling list above is a small excerpt of general-interest terms. It also lists entities specific to UN Geneva (Palais des Nations gates, internal systems like `gDoc`/`gMeets`) that aren't relevant to UNDRR content; those are intentionally left out here. If you hit a spelling question this list doesn't answer, check the [UN Geneva style guide's full A–Z list](https://www.ungeneva.org/en/styleguide) or the [United Nations Editorial Manual's spelling list](https://www.un.org/dgacm/en/content/editorial-manual/spelling) before guessing.
|
|
112
|
+
|
|
113
|
+
## UNDRR-specific terminology
|
|
114
|
+
|
|
115
|
+
Rules and named entities that only make sense in UNDRR content, pulled from the UNDRR Publications SOP (the internal UNDRR house style built on top of the United Nations Editorial Manual). The SOP is the source for every rule here unless another source is cited inline.
|
|
116
|
+
|
|
117
|
+
- **"data" is plural**: "the data show", not "the data shows".
|
|
118
|
+
- **Be consistent about singular vs. plural "risk"**: decide per-document/per-component whether you mean the general concept ("risk") or countable instances ("risks"), and don't switch within the same piece of copy.
|
|
119
|
+
- **Avoid the first person**: no "we", "us", "our" or "I" in UNDRR content, including UI microcopy; write from a third-person or user-directed voice instead. In interface messages, name the thing that happened rather than who did it: "Your changes couldn't be saved", not "We couldn't save your changes"; "This page can't be found", not "We can't find the page". Addressing the user as "you" is still fine. **One exception:** guest-authored blogs and op-eds signed by a named author may use first person where it rests on the author's firsthand experience, because that is the author's voice rather than UNDRR's. It never extends to an undefined institutional "we", to first person used to promote, or to anything UNDRR writes around the piece (title, short description, editor's notes). See the [blogs writing guide](https://assets.undrr.org/docs/editorial-guides/blogs.md#first-person). (UNDRR Communications decision, [undrr/web-backlog#3109](https://gitlab.com/undrr/web-backlog/-/work_items/3109))
|
|
120
|
+
- **Hazard names**: follow the spelling and classification in the UNDRR-ISC Hazard Definition and Classification Review (the source of the Hazard Information Profiles) rather than inventing variants.
|
|
121
|
+
- **Sendai Framework references**: "Target A", "Target B" ... (not "target a" or "Target 1"); "Priority 1", "Priority 2" ...; "Indicator A-1", "Indicator B-2" ... for the 38 monitoring indicators. Capitalize the word (Target/Priority/Indicator) as part of the name.
|
|
122
|
+
- **Named entities, in exact form, abbreviated only after first mention**: "Global Assessment Report on Disaster Risk Reduction 20XX (GAR20XX)"; "Sendai Framework for Disaster Risk Reduction 2015–2030" (then "Sendai Framework"); "Addis Ababa Action Agenda on Financing for Development" (then "Addis Ababa Action Agenda" or "AAAA"); "Transforming our world: the 2030 Agenda for Sustainable Development" (then "2030 Agenda"); "Sustainable Development Goals" (then "SDG"/"SDGs"); "MCR2030" for the current initiative (Making Cities Resilient 2030) and for Mangrove's MCR2030 theme. MCR2030 is the initiative's own name, so use it as is rather than treating it as an abbreviation to expand. It succeeded the "Making Cities Resilient Campaign" (2010–2020), so don't use one name for the other. "Special Representative of the Secretary-General for Disaster Risk Reduction" is never abbreviated, no matter how often it recurs.
|
|
123
|
+
- **Country names**: use the UNTERM short form (e.g. "United States of America", shortened to "United States" after first mention), never an abbreviation or acronym. Alphabetize country names in a list unless there's a specific reason not to.
|
|
124
|
+
- **Gender-neutral terms UNDRR has chosen**: "Chair" or "Chairperson" (not "Chairman"); "he/she" or "they"; "humankind"; "human-made". "Man-made" is reserved for direct quotations from paragraph 15 of the Sendai Framework resolution (A/RES/69/283); never use it in original UNDRR copy.
|
|
125
|
+
- **Avoid gendered-default constructions and unnecessary gender-marking**: don't default a role to one gender and mark the other as an exception (e.g. "farmer" implying male, "farmer's wife" for the female case) or add a gender qualifier where it isn't relevant to the content ("female athlete" when the person's sex has no bearing on the story). **"Flip it to test it"**: when copy names or describes a person, mentally swap the gender. If the result reads strange or the example no longer makes sense, that's a sign of an unexamined bias worth fixing. (DPI [Department of Public Information] Gender Checklist for Content Creators, 2018, "Check your words")
|
|
126
|
+
- **Source attribution for data, charts and figures**: put a source line under the figure or table, following the template `Source: [organization] ([year])`, with only the word "Source" in italics. For example: _Source_: World Meteorological Organization (2024). For UNDRR's own data the organization is "United Nations Office for Disaster Risk Reduction". Give a full citation in APA style where a references list exists. In HTML, the italics are `<em>Source</em>:`. For a Mangrove component that renders a data source line (chart footers, stat cards), use this pattern rather than inventing a new one.
|
|
127
|
+
|
|
128
|
+
## Disability inclusive language
|
|
129
|
+
|
|
130
|
+
This section is scoped to terminology and copy. For keyboard/screen-reader/contrast requirements, see [Accessibility](https://mangrove.undrr.org/?path=/docs/getting-started-accessibility--docs), which this doc doesn't repeat. ([United Nations Disability-Inclusive Communications Guidelines](https://www.un.org/sites/un2.un.org/files/un_disability-inclusive_communication_guidelines.pdf))
|
|
131
|
+
|
|
132
|
+
- **Use person-first language**: "person with disability", "person with [type of impairment]", not identity-first phrasing ("disabled person"). In line with the CRPD (Convention on the Rights of Persons with Disabilities), this is the convention the United Nations has chosen and UNDRR content should follow it. The guide's own table makes an exception for "deaf person" and "blind person", which it lists as appropriate alongside the person-first forms. ("Written storytelling: Use person-first language")
|
|
133
|
+
- **Never use a euphemism or a term that implies pity, heroism or abnormality**: not "differently abled", "special needs", "people of determination", "handicapped" or "suffers from [condition]". These read as more polite but do the opposite: they distance the reader from calling disability what it is. ("Avoid pejorative language")
|
|
134
|
+
- **Avoid ableist language**, including using a disability term as a metaphor or adjective for something unrelated (e.g. "that's so OCD", "are you blind?"). ("Ableism in language")
|
|
135
|
+
- **"Persons with disabilities" is the correct term on its own**: it doesn't need to be softened or modified further.
|
|
136
|
+
|
|
137
|
+
**Recommended terms and terms to avoid** (a representative subset of the guide's full table; check the source PDF's Table 1 for the complete list, which also covers short stature, Down syndrome, albinism, leprosy and communication-device users):
|
|
138
|
+
|
|
139
|
+
| Use | Avoid |
|
|
140
|
+
|---|---|
|
|
141
|
+
| person with disability / persons with disabilities | disabled person, handicapped, differently abled, people of determination, special needs |
|
|
142
|
+
| person(s) without impairment, broader population | normal, healthy, able-bodied |
|
|
143
|
+
| person with an intellectual disability/impairment | retarded, slow, mentally handicapped |
|
|
144
|
+
| person with a psychosocial disability | insane, crazy, psycho, mentally ill |
|
|
145
|
+
| deaf person / person who is deaf / hard-of-hearing person | the deaf, hearing impaired, deaf and dumb |
|
|
146
|
+
| blind person / person who is blind / person with low vision | the blind, partially sighted |
|
|
147
|
+
| person with a physical disability/impairment | crippled, invalid, handicapped, physically challenged |
|
|
148
|
+
| wheelchair user / person who uses a wheelchair | confined to a wheelchair, wheelchair-bound |
|
|
149
|
+
| accessible parking / accessible bathroom | disabled parking, handicapped bathroom |
|
|
150
|
+
|
|
151
|
+
("Table 1: Appropriate and pejorative language", itself credited in the source to the Disability-Inclusive Language Guidelines of the United Nations Office at Geneva)
|
|
152
|
+
|
|
153
|
+
## Keeping this updated
|
|
154
|
+
|
|
155
|
+
**Sources last verified: 23 September 2026.** Every rule and citation above was checked against the live/current text of all five sources on that date. Update this date whenever the doc is re-checked, so a reader can tell at a glance how stale the citations might be.
|
|
156
|
+
|
|
157
|
+
This is a **derived, curated subset** of the five sources above: not a verbatim copy, and not exhaustive. All five cover far more than is reproduced here (full A–Z spelling lists, document/resolution formatting, indirect speech, quotations, image and map policy, publication process, visual storytelling and accessible-format guidance, narrative/imagery content-strategy checks). Go to the source directly for anything not covered:
|
|
158
|
+
|
|
159
|
+
- **UNDRR Publications SOP** (internal: [UNDRR Publications page](https://unitednations.sharepoint.com/sites/UNDRR-DRR-COMMS/SitePages/Publications.aspx) (UNDRR staff only))
|
|
160
|
+
- [UN Geneva Web Style Guide](https://www.ungeneva.org/en/styleguide)
|
|
161
|
+
- [United Nations Editorial Manual, Style section](https://www.un.org/dgacm/en/content/editorial-manual): [Abbreviations](https://www.un.org/dgacm/en/content/editorial-manual/abbreviations), [Capitalization](https://www.un.org/dgacm/en/content/editorial-manual/capitalization), [Italics and bold print](https://www.un.org/dgacm/en/content/editorial-manual/italics), [Numbers, dates and time](https://www.un.org/dgacm/en/content/editorial-manual/numbers-dates-time), [Punctuation](https://www.un.org/dgacm/en/content/editorial-manual/punctuation), [Spelling](https://www.un.org/dgacm/en/content/editorial-manual/spelling)
|
|
162
|
+
- [United Nations Disability-Inclusive Communications Guidelines](https://www.un.org/sites/un2.un.org/files/un_disability-inclusive_communication_guidelines.pdf) (PDF)
|
|
163
|
+
- **DPI Gender Checklist for Content Creators** (2018; not publicly linkable, so request a copy from the gender focal points in the Department of Global Communications, formerly DPI)
|
|
164
|
+
|
|
165
|
+
**When there's a conflict between the sources**, in priority order:
|
|
166
|
+
|
|
167
|
+
1. **UNDRR Publications SOP** wins for anything UNDRR-specific (named entities such as Sendai Framework targets/priorities/indicators, GAR and campaigns; UNDRR terminology conventions; gender language choices), since it's the UNDRR house style.
|
|
168
|
+
2. **United Nations Disability-Inclusive Communications Guidelines** wins for disability terminology and framing specifically; it's the specialist United Nations system-wide source on that one topic.
|
|
169
|
+
3. **DPI Gender Checklist for Content Creators** wins for gender-bias review technique specifically (the "flip it to test it" check and avoiding gendered-default constructions); it's the specialist source on that one topic.
|
|
170
|
+
4. **UN Geneva Web Style Guide** wins for general web/UI mechanics none of the above address, since it's written for the web specifically and the SOP is written for print/PDF publications.
|
|
171
|
+
5. **United Nations Editorial Manual** is the fallback where none of the above covers a case.
|
|
172
|
+
|
|
173
|
+
Translate a document-writing rule to its web/UI equivalent explicitly (as this doc does for italics and print-only list punctuation) rather than applying it literally to component markup.
|
|
174
|
+
|
|
175
|
+
**When to revisit this doc**:
|
|
176
|
+
|
|
177
|
+
- When UI copy introduces a new United Nations-specific or UNDRR-specific term, acronym, named entity or programme name not covered above. Check the SOP and source spelling lists rather than guessing, and add it here if it's likely to recur.
|
|
178
|
+
- When a component's copy needs a capitalization, punctuation or number-formatting call this doc doesn't cover. Check the source pages first, then add the rule here with its citation.
|
|
179
|
+
- When content references a type of disability or impairment not in the terminology table above. Check the source PDF's full Table 1 before guessing at a term.
|
|
180
|
+
- When the UNDRR Publications SOP is updated (it's dated by year, e.g. "SOP_Publication-2026"). Confirm the rules above still match and update citations to the current version.
|
|
181
|
+
- Periodically alongside major Mangrove releases, to confirm the source URLs and rules above still match the live UN Geneva style guide and Editorial Manual. Both can and do change without notice; the style guide's own last-updated date is at the bottom of its page. Update the "Sources last verified" date above whenever this check happens, whether or not anything actually changed.
|
|
182
|
+
|
|
183
|
+
**Where copies are published**: edit this file only. Each build also publishes it, with its links pointing at Storybook, as `docs/EDITORIAL-MANUAL.md` and, in the `llms.txt` format, as `docs/llms-editorial-manual.txt`, both in the npm package and on the UNDRR asset library: `https://assets.undrr.org/mangrove/latest/docs/` for the latest build and `https://assets.undrr.org/mangrove/{version}/docs/` for a release, from the release after 2.0.0. The `llms-editorial-manual.txt` sub-manifest is also served from the Storybook site root. Those copies are generated, so a change made to one of them is lost at the next build.
|
|
184
|
+
|
|
185
|
+
## Found a problem?
|
|
186
|
+
|
|
187
|
+
If a rule here is wrong, out of date or missing, open an issue in the [Mangrove issue queue](https://github.com/PreventionWeb/undrr-mangrove/issues) (a GitHub account is needed) and say which rule and which source.
|
|
188
|
+
|
|
189
|
+
## Related documentation
|
|
190
|
+
|
|
191
|
+
- [UNDRR editorial guides](https://assets.undrr.org/docs/editorial-guides/README.md): how to write news, events, publications and blogs for UNDRR websites
|
|
192
|
+
- [Writing guidelines](https://mangrove.undrr.org/?path=/docs/contributing-writing-guidelines--docs): UX writing principles, tone, inclusive language and the "write for two audiences" model
|
|
193
|
+
- Writing quick reference: compact summary for AI tools and quick lookups
|
|
194
|
+
|
|
195
|
+
## Links
|
|
196
|
+
|
|
197
|
+
- Rendered version in Storybook: https://mangrove.undrr.org/?path=/docs/contributing-editorial-manual--docs
|
|
198
|
+
- Source on GitHub: https://github.com/PreventionWeb/undrr-mangrove/blob/main/docs/EDITORIAL-MANUAL.md
|
|
199
|
+
- Full component/library manifest: https://mangrove.undrr.org/llms.txt
|
|
200
|
+
- Report a problem with this guide: https://github.com/PreventionWeb/undrr-mangrove/issues
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Mangrove motion and animation guidance
|
|
2
|
+
|
|
3
|
+
> Shared component motion policy: purpose, interaction tokens, looping cycles, CSS and JavaScript reduced motion, progress indicators, forced colours, RTL, documentation and browser review.
|
|
4
|
+
|
|
5
|
+
This is Mangrove's shared reference for component motion. Apply it alongside the [accessibility guide](https://mangrove.undrr.org/?path=/docs/getting-started-accessibility--docs) and [review checklist](https://mangrove.undrr.org/?path=/docs/contributing-build-a-component-review-checklist--docs). AI consumers can fetch the same guidance as [llms-motion.txt](https://mangrove.undrr.org/llms-motion.txt).
|
|
6
|
+
|
|
7
|
+
The [Interfaces.dev cheat sheet](https://interfaces.dev/cheat-sheet#animation) is a review lens, not a specification. Mangrove adopts its feedback and continuity principles. Press scaling, icon transitions and task-specific sequencing are optional only where they improve feedback or continuity; decorative and viewport-entry effects are excluded. Other review themes belong to the interface quality review (unisdr/undrr-mangrove#1280).
|
|
8
|
+
|
|
9
|
+
## Give motion a purpose
|
|
10
|
+
|
|
11
|
+
Use motion to confirm a user action, explain continuity between states, or communicate ongoing work. Keep it brief, restrained and interruptible. A user can reverse an open/close action or start another task without waiting for an animation to finish. Focus, activation and semantic state must update without waiting for visual completion.
|
|
12
|
+
|
|
13
|
+
Do not add decorative, attention-seeking or viewport-entry animations. Mangrove removed viewport scroll animations in unisdr/undrr-mangrove#867. An element must remain visible and usable when animation never runs; motion must never be the only way to communicate state.
|
|
14
|
+
|
|
15
|
+
Choose whether to animate before choosing timing. Repetitive navigation, selection and hover feedback may be instant; frequently opened menus should normally appear immediately. Test repeated use at realistic working speed.
|
|
16
|
+
|
|
17
|
+
Prefer transitions for reversible state changes. Reserve finite keyframes for justified sequences with a cancellation path. Initial rendering, hydration and theme changes must not trigger incidental interaction animations.
|
|
18
|
+
|
|
19
|
+
Anchor popup motion to its trigger and edge-attached surfaces to their edge. Closing should be quieter than opening; timing and travel need not be symmetrical.
|
|
20
|
+
|
|
21
|
+
For pointer-only hover effects, use `@media (hover: hover)`; preserve keyboard feedback.
|
|
22
|
+
|
|
23
|
+
## Use the existing timing tokens
|
|
24
|
+
|
|
25
|
+
| Token | Default | Use |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `--mg-motion-duration-fast` | `160ms` | Optional local feedback, small state changes and brief exits |
|
|
28
|
+
| `--mg-motion-duration-medium` | `300ms` | Larger surface or drawer movement that needs continuity |
|
|
29
|
+
| `--mg-motion-easing-standard` | `cubic-bezier(0.2, 0, 0, 1)` | Interaction transitions and finite state-change animations |
|
|
30
|
+
|
|
31
|
+
These tokens live in `tokens/mangrove.yaml`. Start with this set when motion is justified; it is not a minimum duration or evidence that one curve suits every interaction. Immediate feedback needs no transition or timing token. Add a shared token only when repeated component needs justify it, with evidence across themes and reduced motion. Never hand-edit generated token output.
|
|
32
|
+
|
|
33
|
+
Name the properties being transitioned instead of using `transition: all`. Use tokens for finite interaction timing, including finite keyframes. Prefer transform and opacity where they serve the interaction, while keeping the final layout correct without them.
|
|
34
|
+
|
|
35
|
+
### Loop periods and behavioural delays
|
|
36
|
+
|
|
37
|
+
A spinner revolution or scanner sweep is a cycle, not an interaction transition. Do not shorten it to the fast or medium token. Reuse Loader or ProgressBar rather than creating another indicator. Loader documents `--mg-loader-duration: 0.9s` for one revolution; ProgressBar uses a `1.5s` scanner cycle in its stylesheet. Linear rotation and the scanner's `ease-in-out` describe their repeating motion rather than a finite state change.
|
|
38
|
+
|
|
39
|
+
If a new component needs an adjustable cycle, use a component-scoped property such as `--mg-{component}-duration`. Document its base value, what one cycle means, why the duration is needed, and the reduced-motion state in SCSS and MDX. Describe any public property in `scripts/ai-manifest/custom-properties.js`. A justified, documented cycle literal is allowed; it does not justify hard-coded interaction timing.
|
|
40
|
+
|
|
41
|
+
Hover intent, debounce and delayed loading feedback are behavioural delays, not motion tokens. Document them separately. If JavaScript retains an exiting element, derive retention from the actual transition duration and delay, use zero when reduced motion is requested, and release focus immediately. Do not use an animation event as the only way to complete an action or remove a blocking overlay.
|
|
42
|
+
|
|
43
|
+
## Start with a usable reduced-motion state
|
|
44
|
+
|
|
45
|
+
Put optional motion inside `@media (prefers-reduced-motion: no-preference)`. The base style provides the final visible and usable state; the media query enhances the transition to it.
|
|
46
|
+
|
|
47
|
+
```scss
|
|
48
|
+
.mg-example {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
|
|
51
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
52
|
+
transition: opacity var(--mg-motion-duration-fast)
|
|
53
|
+
var(--mg-motion-easing-standard);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Check intermediate states as well as start and end: content must not remain at zero opacity, off-screen, or non-interactive when motion is disabled. Cancelling or reversing an animation must leave the correct state.
|
|
59
|
+
|
|
60
|
+
### The global reset is a fallback
|
|
61
|
+
|
|
62
|
+
`stories/assets/scss/_foundational.scss` sets `animation-duration` and `transition-duration` to `0.01ms !important`, animation iteration count to `1 !important`, and `scroll-behavior` to `auto !important` under reduced motion. It applies to elements and their `::before` and `::after` pseudo-elements.
|
|
63
|
+
|
|
64
|
+
This is a safety net, not a component's reduced-motion design. It runs an ungated animation once almost immediately; the visible result depends on its keyframes and fill mode. It can leave a loading indicator looking stalled or partly complete. It does not remove transition delays or guarantee that JavaScript lifecycle work completes correctly.
|
|
65
|
+
|
|
66
|
+
### Keep progress understandable
|
|
67
|
+
|
|
68
|
+
Reuse the shared [Loader](https://mangrove.undrr.org/?path=/docs/components-loader--docs) or [ProgressBar](https://mangrove.undrr.org/?path=/docs/components-progress-bar--docs), with accessible labels and the component's announcement pattern. Freezing a spinner is not a designed static loading state; a labelled still alternative can communicate ongoing work.
|
|
69
|
+
|
|
70
|
+
- Loader uses a deliberately static dashed ring under reduced motion. Its non-decorative form exposes the translated loading label in normal flow; decorative use requires caller-owned visible pending text and an announcement owner. Remove the indicator when work ends and report completion or failure through application state. The shared Loader no longer has a slow-rotation exception.
|
|
71
|
+
- Indeterminate ProgressBar replaces its moving scanner with a static, full-width dashed pattern under reduced motion. Use it with a visible loading label where a still indicator is appropriate. Determinate progress continues to show the true value without interpolating it.
|
|
72
|
+
- A custom static alternative must identify that work is ongoing through a label and shape, and distinguish it from completed or failed work. Document and review the exception before creating another indicator.
|
|
73
|
+
|
|
74
|
+
An indicator alone cannot detect a stalled request. Delay, error and completion messages must follow application state, rather than implying that motion proves useful work is continuing.
|
|
75
|
+
|
|
76
|
+
The [Loader decision and research record](https://github.com/PreventionWeb/undrr-mangrove/blob/main/docs/LOADER-REDUCED-MOTION-RESEARCH.md) explains the static default adopted for unisdr/undrr-mangrove#1368. This is a design decision to remove an unvalidated motion exception, not a completed study or proof of universal comprehension. The retained legacy search-spinner CSS has a separate compatibility exception pending its consumer migration; do not copy it into new implementations.
|
|
77
|
+
|
|
78
|
+
### Check JavaScript-driven motion at the action
|
|
79
|
+
|
|
80
|
+
The CSS reset does not control an explicit JavaScript smooth-scroll request, Web Animations API playback, or motion lifecycle timers. Check the preference when initiating motion, using the target element's owning window so embedded contexts work correctly.
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
const view = target.ownerDocument.defaultView;
|
|
84
|
+
const allowMotion = view?.matchMedia(
|
|
85
|
+
'(prefers-reduced-motion: no-preference)'
|
|
86
|
+
).matches;
|
|
87
|
+
|
|
88
|
+
target.scrollIntoView({
|
|
89
|
+
behavior: allowMotion ? 'smooth' : 'instant',
|
|
90
|
+
block: 'nearest',
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`instant` ensures the reduced-motion path does not inherit a consumer's CSS smooth scrolling. If using `auto`, guarantee `scroll-behavior: auto` on the scrolling container in that path. TableOfContents and Pager check the preference before scrolling; MegaMenu checks it when deciding exit retention. Inspect their context rather than copying a cached preference blindly.
|
|
95
|
+
|
|
96
|
+
For CSS classes applied by JavaScript, gate the corresponding CSS animation as above and ensure state changes work without it. For ongoing JavaScript animations, observe preference changes and cancel or settle to the final usable state; remove listeners on cleanup. Do not delay focus or announcements to match visual motion.
|
|
97
|
+
|
|
98
|
+
## Preserve forced colours and reading direction
|
|
99
|
+
|
|
100
|
+
Test forced colours and reduced motion together. Indicators need a visible track and state with system colours; gradients, shadows or author background colours alone may disappear. Loader uses `GrayText` and `CanvasText` for its moving border segments, and a static `CanvasText` shape under reduced motion; ProgressBar uses system colours and a visible border. Scope `forced-color-adjust: none` narrowly when required to preserve a meaningful shape, and supply system colours explicitly.
|
|
101
|
+
|
|
102
|
+
Directional travel follows the reading direction. Use logical positioning and mirror horizontal transforms where they imply inline start/end; logical offsets do not reverse physical `translateX()` values. ProgressBar's `:dir(rtl)` scanner is the reference. Rotation and vertical movement do not need mirroring merely because the page is RTL.
|
|
103
|
+
|
|
104
|
+
## Document and verify component behaviour
|
|
105
|
+
|
|
106
|
+
A component's MDX behaviours section must state:
|
|
107
|
+
|
|
108
|
+
- What moves and which user need it serves, including the trigger and final state.
|
|
109
|
+
- Interaction tokens or cycle properties, base values and any justified exceptions.
|
|
110
|
+
- What users see under reduced motion, including loading and interrupted states.
|
|
111
|
+
- How JavaScript honours the preference, if applicable, and how focus and announcements behave.
|
|
112
|
+
- Relevant forced-colours and RTL treatment.
|
|
113
|
+
|
|
114
|
+
Include representative interaction/loading stories and a changelog entry when behaviour changes. Link this guide rather than duplicating the policy. Verify in a real browser with no preference and reduced motion, forced colours separately and combined, RTL, keyboard operation, relevant viewports and all affected themes. Toggle the preference while mounted and repeat/reverse interactions. Confirm labels and state remain understandable with motion disabled; jsdom and screenshot snapshots alone cannot verify animation timing or the CSS cascade.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
The deterministic real-browser regression gate is `yarn test:motion-browser`; see [Testing: motion and forced-colour browser gate](https://mangrove.undrr.org/?path=/docs/contributing-build-a-component-testing--docs#motion-and-forced-colour-browser-gate) for serving Storybook, the theme/media matrix and review artifacts. New literal timing values are rejected by Stylelint; legacy baseline entries must be pruned as their declarations are migrated.
|
|
118
|
+
|
|
119
|
+
## Links
|
|
120
|
+
|
|
121
|
+
- Rendered version in Storybook: https://mangrove.undrr.org/?path=/docs/design-decisions-motion--docs
|
|
122
|
+
- Source on GitHub: https://github.com/PreventionWeb/undrr-mangrove/blob/main/docs/MOTION.md
|
|
123
|
+
- Component review checklist: https://mangrove.undrr.org/?path=/docs/contributing-build-a-component-review-checklist--docs
|
|
124
|
+
- Full component/library manifest: https://mangrove.undrr.org/llms.txt
|
|
125
|
+
- Report a problem with this guide: https://github.com/PreventionWeb/undrr-mangrove/issues
|