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.
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:
lang=cy
In the Welsh version of the service:
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.
When testing, pay particular attention to the following WCAG success criteria:
Need help implementing this in a prototype or production build? Get support from the Design System team.
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.
Send questions, comments or suggestions to the DWP Design System team.
Last updated: