Components

Service navigation

Service navigation helps users understand that they’re using your service and lets them navigate around your service.

WCAG 2.2

New WCAG 2.2 criteria affect this component

To use ‘Service navigation’ and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

See the full list of components and patterns affected by WCAG 2.2.

When to use this component

Use the Service navigation to help users understand that they’re using your service.

To decide when to use navigation links in your service, see the ‘Help users to navigate a service’ pattern.

How it works

Together, the GOV.UK header and Service navigation components ensure users get a consistent experience on GOV.UK.

This also assures users that they’re in the right place to use your service and to understand that GOV.UK functions as one website.

For guidance on how to plan your header and navigation, see the Help users navigate a service pattern.

Change the blue colour bar under the GOV.UK header to full width

To use the GOV.UK header and Service navigation and make them fit together visually, you’ll need to change the bottom blue border of the GOV.UK header to full width.

Apply a class govuk-header--full-width-border to the GOV.UK header.

Showing your service name only

We recommend that you use the Service navigation component to show your service name, instead of the GOV.UK header, and to start updating existing services.

Show navigation links to let users navigate to different parts of your service and find useful links and tools.

See when and how to show navigation links in the Help users navigate a service pattern.

WCAG 2.2

Do not make header elements, like dropdown menus, ‘sticky’ to the top of the page by using `position: fixed` or any other method. In other words, avoid any implementations that cause menus to sit on top of page content.

This is to make sure elements do not hide or obscure any content which has a focus applied and comply with WCAG 2.2 success criterion 2.4.11 Focus not obscured (minimum).

In November 2021, the GOV.UK homepage introduced a menu bar that avoids obscuring content by shifting the page down.

Use ‘slots’ to add custom elements

The Service navigation includes the option to use ‘slots’ to insert custom HTML code at specific points inside the component. This helps you extend the component to add custom elements, such as language selectors.

You must provide your own styles and JavaScript code for the content within a slot, particularly if you’re not using an existing component. You’ll need to decide on the most appropriate layout and positioning.

The Help users to navigate a service pattern includes some guidance on ‘Adding other header and navigation elements’.

Ensure the ‘aria-label’ is accurate for users of assistive technology

When a service name is shown, we let users know that there’s information about the service with a ‘region landmark’ using the <section> element.

Depending on what you add in the slots, you might need to rename the aria-label to accurately describe what’s in the section.

Test with each update of GOV.UK Frontend

There’s a risk that slot contents may look or work differently in a future release of GOV.UK Frontend.

You’ll need to ensure that slot content still works as intended after each update.

Research on this component

See the research section in the Help users navigate a service pattern for a summary of our research on the GOV.UK header and Service navigation, and how you can share your feedback with us.

Help improve this component

To help make sure that this page is useful, relevant and up to date, you can:

Tell us if your service uses this component

Take part in our usage survey (opens in a new tab) to help us improve this component to better meet the needs of the services that use it.

Need help?

If you’ve got a question about the GOV.UK Design System, contact the team.