<!--stopindex--><!-- #include virtual="/shared/includes/alert/alert-global-ds.htm" --><headerclass="global-header"style="background-image: url(/designsystem/assets/img/header-bg-lg.png);"><divclass="container clearfix"><aclass="logo"aria-label="City of Winnipeg homepage"href="https://winnipeg.ca"><imgalt="City of Winnipeg logo"src="/designsystem/assets/img/cw-v-white-rgb.svg"></a><divclass="mobile-nav"><buttonclass="btn langBtn languagelink"><spanclass="far fa-globe"aria-hidden="true"></span>
Français
</button><buttonclass="btn menuBtn"><spanclass="far fa-bars"aria-hidden="true"></span>
Menu
</button><buttonclass="btn searchBtn"><spanclass="fas fa-search"aria-hidden="true"></span>
Search
</button></div><divclass="search-group-container clearfix"><formaction="https://winnipeg.ca/search/default.stm"><divclass="form-group search-group sm"><inputid="globalSearchInput"type="search"name="q"class="form-control form-control-sm dark google-search google-search-header"aria-label="Search the City of Winnipeg"><buttondisabledid="globalSearchBtn"type="submit"aria-label="Search the City of Winnipeg"class="btn btn-sm btn-search dark"><iaria-hidden="true"class="far fa-search"></i></button></div></form></div><divclass="language-container"><aclass="accent languagelink"href="https://winnipeg.ca/francais/interhom/default.asp"id="francaislink"name="francaislink"aria-label="Français">Français</a></div><navclass="main-nav"><ulclass="list-unstyled no-inline-links"><li><ahref="https://winnipeg.ca/interhom/toc/residents.asp">Residents</a></li><li><ahref="https://winnipeg.ca/interhom/toc/business.asp">Business</a></li><li><ahref="https://winnipeg.ca/interhom/toc/visitors.asp">Visitors</a></li><li><ahref="https://winnipeg.ca/interhom/toc/cityhall.asp">City Hall</a></li><li><ahref="https://winnipeg.ca/interhom/toc/departments.asp">Departments</a></li><li><aclass="accent"href="https://winnipeg.ca/311/default.asp">311 City services</a></li></ul></nav></div></header><divclass="header-gradient headerGradient"><buttonaria-label="Close menu"class="btn link-btn header-close-btn headerCloseBtn"><spanclass="far fa-times"aria-hidden="true"></span></button></div><!--startindex-->
French global header
<!--stopindex--><!-- #include virtual="/shared/includes/alert/alert-global-ds.htm" --><headerclass="global-header"style="background-image: url(/designsystem/assets/img/header-bg-lg.png);"><divclass="container clearfix"><aclass="logo"aria-label="Page d'accueil de la ville de Winnipeg"href="https://winnipeg.ca/francais/"><imgalt="Logo de la ville de Winnipeg"src="/designsystem/assets/img/cw-v-white-rgb.svg"></a><divclass="mobile-nav"><buttonclass="btn langBtn languagelink"><spanclass="far fa-globe"aria-hidden="true"></span>
English
</button><buttonclass="btn menuBtn"><spanclass="far fa-bars"aria-hidden="true"></span>
Menu
</button><buttonclass="btn searchBtn"><spanclass="fas fa-search"aria-hidden="true"></span>
Recherche
</button></div><divclass="search-group-container clearfix"><formaction="https://winnipeg.ca/francais/search/default.stm"><divclass="form-group search-group sm"><inputid="globalSearchInput"type="search"name="q"class="form-control form-control-sm dark google-search google-search-header"aria-label="Recherche la ville de Winnipeg"><buttondisabledid="globalSearchBtn"type="submit"aria-label="Recherche – Ville de Winnipeg"class="btn btn-sm btn-search dark"><iaria-hidden="true"class="far fa-search"></i></button></div></form></div><divclass="language-container"><aclass="accent languagelink"href="https://winnipeg.ca/interhom/default.asp"id="englishlink"name="englishlink"aria-label="English">English</a></div><navclass="main-nav"><ulclass="list-unstyled no-inline-links"><li><ahref="https://winnipeg.ca/francais/interhom/toc/residents.asp">Résidents</a></li><li><ahref="https://winnipeg.ca/francais/interhom/toc/business.asp">Entreprises</a></li><li><ahref="https://winnipeg.ca/francais/interhom/toc/visitors.asp">Visiteurs</a></li><li><ahref="https://winnipeg.ca/francais/interhom/toc/cityhall.asp">Hôtel de ville</a></li><li><ahref="https://winnipeg.ca/francais/interhom/toc/departments.asp">Services</a></li><li><aclass="accent"href="https://winnipeg.ca/francais/311/default.asp">Service 311 de la Ville</a></li></ul></nav></div></header><divclass="header-gradient headerGradient"><buttonaria-label="Fermer le menu"class="btn link-btn header-close-btn headerCloseBtn"><spanclass="far fa-times"aria-hidden="true"></span></button></div><!--startindex-->
Javascript
Add the following JavaScript for the search input, mobile menu and mobile search bar functionality:
// Search bar$('#globalSearchInput').keyup(function(){if($(this).val()===''){$('#globalSearchBtn').attr("disabled",true);}else{$('#globalSearchBtn').attr("disabled",false);}});// Mobile menufunctionopenMenu(){$('html').scrollTop(0);$('.headerGradient').fadeIn(200);$('.headerGradient').addClass('menuOpen');$('nav.main-nav').addClass('in');$('body').css({'position':'fixed','left':0,'right':0,'top':0});}functioncloseMenu(){$('.headerGradient').fadeOut(200);$('.headerGradient').removeClass('menuOpen');$('nav.main-nav').removeClass('in');$('body').css({'position':'initial','left':'auto','right':'auto','top':'auto'});}$('.menuBtn').click(function(){openMenu();})// Mobile searchfunctionopenSearch(){$('html').scrollTop(0);$('.headerGradient').fadeIn(200);$('.global-header .search-group-container').addClass('in');$('.global-header .search-group-container input').focus();$('body').css({'position':'fixed','left':0,'right':0,'top':0});}functioncloseSearch(){$('.headerGradient').fadeOut(200);$('.global-header .search-group-container').removeClass('in');$('body').css({'position':'initial','left':'auto','right':'auto','top':'auto'});}$('.searchBtn').click(function(){openSearch();})// Close search and menu on gradient click$('.headerGradient, .headerCloseBtn').click(function(){closeMenu();closeSearch();})
Vertical header
The vertical header is intended for use on all internally produced applications outside of the main public website.
Best practices
Wherever possible, limit the number of parent navigation items to 10 and the children within a parent section to 15. Note: These numbers should be treated as absolute upper limits, not targets.
Parent items with children should always include a chevron. Parent items without children don’t require a chevron.
The search field is optional and depends on the scope of the product.
Example
See a live example of this to the left.
<headerclass="mobile-vertical-header-nav"><navclass="clearfix"><aclass="logo"aria-label="Confluence: The City of Winnipeg's design system"href="/designsystem/"><imgalt="City of Winnipeg logo"src="/designsystem/assets/img/cw-v-white-rgb.svg"></a><divclass="float-right"><buttonclass="btn verticalHeaderBtn"><spanclass="far fa-bars"aria-hidden="true"></span>
Menu
</button></div></nav></header><headerclass="vertical-header"><navclass="sidenav"><sectionclass="logo-section"><aaria-label="Confluence: The City of Winnipeg's design system"href="/designsystem/"><imgalt="City of Winnipeg logo"src="/designsystem/assets/img/cw-v-white-rgb.svg"></a><pclass="white mt-3">Confluence: The City of Winnipeg's design system</p></section><!-- <form action="/designsystem/search-results">
<div class="search-group sm">
<input required id="searchInput" type="search" class="form-control dark form-control-sm" name="query" placeholder="Search the design system" aria-label="Search">
<button disabled type="submit" aria-label="Search the City of Winnipeg design system" class="btn btn-sm dark btn-search" id="searchBtn"><i aria-hidden="true" class="far fa-search"></i></button>
</div>
</form> --><section><buttonid="gettingStarted"data-target="#gettingStartedCollapse"aria-expanded="false"aria-controls="gettingStartedCollapse"class="btn btn-sidebar sidebarBtn">Getting started<iclass="far fa-chevron-down "></i></button><ulid="gettingStartedCollapse"aria-labelledby="gettingStarted"class="no-inline-links"><li><ahref="/designsystem/getting-started/overview">Overview</a></li><li><ahref="/designsystem/getting-started/bootstrap-classes">Bootstrap classes</a></li></ul></section><section><buttonid="foundations"data-target="#foundationsCollapse"aria-expanded="false"aria-controls="foundationsCollapse"class="btn btn-sidebar sidebarBtn">Foundations<iclass="far fa-chevron-down "></i></button><ulid="foundationsCollapse"aria-labelledby="foundations"class="no-inline-links"><li><ahref="/designsystem/foundations/accessibility">Accessibility</a></li><li><ahref="/designsystem/foundations/colour">Colour</a></li><li><ahref="/designsystem/foundations/grid">Grid</a></li><li><ahref="/designsystem/foundations/iconography">Iconography</a></li><li><ahref="/designsystem/foundations/typography">Typography</a></li><li><ahref="/designsystem/foundations/usability">Usability</a></li><li><ahref="/designsystem/foundations/value">Value</a></li><li><ahref="/designsystem/foundations/writing-and-language">Writing and language</a></li></ul></section><section><buttonid="components"data-target="#componentsCollapse"aria-expanded="false"aria-controls="componentsCollapse"class="btn btn-sidebar sidebarBtn">Components<iclass="far fa-chevron-down "></i></button><ulid="componentsCollapse"aria-labelledby="components"class="no-inline-links"><li><ahref="/designsystem/components/accordions">Accordions</a></li><li><ahref="/designsystem/components/alerts">Alerts</a></li><li><ahref="/designsystem/components/badges">Badges</a></li><li><ahref="/designsystem/components/breadcrumbs">Breadcrumbs</a></li><li><ahref="/designsystem/components/buttons">Buttons</a></li><li><ahref="/designsystem/components/callouts">Callouts</a></li><li><ahref="/designsystem/components/cards">Cards</a></li><li><ahref="/designsystem/components/embedded-content">Embedded content</a></li><li><buttonid="forms"data-target="#formsCollapse"aria-expanded="false"aria-controls="formsCollapse"class="btn btn-sidebar sidebarBtn">Forms<iclass="far fa-chevron-down "></i></button><ulid="formsCollapse"aria-labelledby="components"class="no-inline-links"><li><ahref="/designsystem/components/forms/forms-overview">Forms overview</a></li><li><buttonid="formTemplates"data-target="#formTemplatesCollapse"aria-expanded="false"aria-controls="formTemplatesCollapse"class="btn btn-sidebar sidebarBtn btn-sidebar-secondary">Form templates<iclass="far fa-chevron-down "></i></button><ulid="formTemplatesCollapse"aria-labelledby="formTemplates"class="no-inline-links"><li><ahref="/designsystem/forms/templates/contact-forms">Contact forms</a></li><li><ahref="/designsystem/forms/templates/forgot-your-password">Forgot your password</a></li><li><ahref="/designsystem/forms/templates/name-and-address-forms">Name and address forms</a></li><li><ahref="/designsystem/forms/templates/sign-in">Sign in</a></li><li><ahref="/designsystem/forms/templates/sign-up">Sign up</a></li><li><ahref="/designsystem/forms/templates/subscription-forms">Subscription forms</a></li></ul></li><li><ahref="/designsystem/components/forms/checkboxes-and-radios">Checkboxes and radio buttons</a></li><li><ahref="/designsystem/components/forms/date-pickers">Date pickers</a></li><li><ahref="/designsystem/components/forms/fieldsets">Fieldsets</a></li><li><ahref="/designsystem/components/forms/file-inputs">File inputs</a></li><li><ahref="/designsystem/components/forms/range-inputs">Range inputs</a></li><li><ahref="/designsystem/components/forms/selects">Selects</a></li><li><ahref="/designsystem/components/forms/switches">Switches</a></li><li><ahref="/designsystem/components/forms/text-inputs">Text inputs</a></li><li><ahref="/designsystem/components/forms/validation">Validation</a></li></ul></li><li><ahref="/designsystem/components/modals">Modals</a></li><li><ahref="/designsystem/components/pagination">Pagination</a></li><li><ahref="/designsystem/components/sidebar-navigation">Sidebar navigation</a></li><li><ahref="/designsystem/components/tables">Tables</a></li><li><ahref="/designsystem/components/tabs">Tabs</a></li><li><ahref="/designsystem/components/tooltips">Tooltips</a></li></ul></section><sectionclass="show"><buttonid="patterns"data-target="#patternsCollapse"aria-expanded="true"aria-controls="patternsCollapse"class="btn btn-sidebar sidebarBtn">Patterns<iclass="far fa-chevron-up "></i></button><ulid="patternsCollapse"aria-labelledby="patterns"class="no-inline-links"><li><ahref="/designsystem/patterns/footers">Footers</a></li><liclass="active"><ahref="/designsystem/patterns/headers">Headers</a></li><li><ahref="/designsystem/patterns/hero-banners">Hero banners</a></li><li><ahref="/designsystem/patterns/search">Search</a></li></ul></section><section><aclass="section-link "href="/designsystem/page-templates">Page templates</a></section></nav></header><divclass="vertical-header-gradient verticalHeaderGradient"><buttonaria-label="Close menu"class="btn link-btn vertical-header-close-btn verticalHeaderCloseBtn"><spanclass="far fa-times"aria-hidden="true"></span></button></div>
Add the following JavaScript for the search bar, section toggle and mobile menu functionality:
// Search form$('#searchInput').keyup(function(){if($(this).val()===''){$('#searchBtn').attr("disabled",true);}else{$('#searchBtn').attr("disabled",false);}});// Dropdown toggles$('.sidebarBtn').click(function(){$(this).find('i').toggleClass('fa-chevron-up fa-chevron-down');if($(this).attr('aria-expanded')==true){$(this).attr({'aria-expanded':false});}else{$(this).attr({'aria-expanded':true});}$(this).next('ul').slideToggle();});// Mobile menufunctionopenVerticalHeader(){$('html').scrollTop(0);$('.verticalHeaderGradient').fadeIn(200);$('header.vertical-header').addClass('in');$('body').css({'position':'fixed','left':0,'right':0,'top':0});}functioncloseVerticalHeader(){$('.verticalHeaderGradient').fadeOut(200);$('header.vertical-header').removeClass('in');$('body').css({'position':'initial','left':'auto','right':'auto','top':'auto'});}$('.verticalHeaderBtn').click(function(){openVerticalHeader();})$('.verticalHeaderGradient, .verticalHeaderCloseBtn').click(function(){closeVerticalHeader();})
Accessibility
Be sure to add aria-expanded to the control element. This attribute explicitly conveys the current state of the collapsible element tied to the control to screen readers and similar assistive technologies. If the collapsible element is closed by default, the attribute on the control element should have a value of aria-expanded="false". If you’ve set the collapsible element to be open by default using the show class, set aria-expanded="true" on the control instead. The plugin will automatically toggle this attribute on the control based on whether or not the collapsible element has been opened or closed (via JavaScript, or because the user triggered another control element also tied to the same collapsible element). If the control element’s HTML element is not a button (e.g., an <a> or <div>), the attribute role="button" should be added to the element.
If your control element is targeting a single collapsible element – i.e. the data-target attribute is pointing to an id selector – you should add the aria-controls attribute to the control element, containing the id of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.
Note that Bootstrap’s current implementation does not cover the various keyboard interactions described in the WAI-ARIA Authoring Practices 1.1 accordion pattern - you will need to include these yourself with custom JavaScript.
Universal header
The universal header is intended for use on all third party products and services that might have their own global header and global components (product logo, navigation, search etc.). The universal header is not intended to be present on screens that have the global or vertical header.
Best practices
The universal header should always include a horizontal City of Winnipeg logo, copy stating ‘This is an official City of Winnipeg website,’ and a link to https://winnipeg.ca.
The universal header should only be used on third party applications where we don’t have control over navigation or global (or application level) headers and footers. When building an application or product, use the vertical header.
Example
This is an official City of Winnipeg website
<headerclass="universal-header"style="background-image: url(/designsystem/assets/img/header-bg.png);"><divclass="container-fluid"><aaria-label="City of Winnipeg"href="https://winnipeg.ca"><imgalt="City of Winnipeg logo"src="/designsystem/assets/img/cv-h-white-rgb.svg"></a><spanclass="small">This is an official City of Winnipeg website</span></div></header>