Skip to main content

Work in progress

This page is a design preview. It may not contain the latest guidance and may not behave as expected.

Current guidance can always be found at design-system.dwp.gov.uk.

Language toggle

Accessibility

To meet WCAG 2.2 success criteria 3.1.1 Language of page and 3.1.2 Language of parts you should make sure the language attribute has been applied properly. This helps things like screen readers to pronounce the content correctly.

In an English/Welsh service this would work as follows.

In the English version of the service:

  • the page's default language must be set to English with
  • the link text 'Cymraeg' must be set to Welsh with lang=cy

In the Welsh version of the service:

  • the page's default language must be set to Welsh with
  • the link text 'English' must be set to English with lang=en

The inactive toggle text does not need a separate language attribute because it is in the default language of the page.

For more about building accessible services see the DWP Accessibility Manual.

WCAG success criteria

When testing, pay particular attention to the following WCAG success criteria:

Get support

Need help implementing this in a prototype or production build? Get support from the Design System team.

Give feedback

We depend on insights from real projects to update and improve the design system. If you use something we made, tell us how it went.


Could we improve this page?

Send questions, comments or suggestions to the DWP Design System team.

Last updated: