Accessibility
Set the correct language attribute
To meet WCAG 2.2 success criteria 3.1.1 Language of Page and 3.1.2 Language of Parts services should make sure the language attribute has been applied properly. This helps things like screen readers to pronounce the content correctly.
In the English version of the service:
- the page's default language must be set to English with
lang=en - 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
lang=cy - the link text ‘English’ must be set to English with
lang=en
The inactive toggle text ('English’ on the English version of the site, ‘Cymraeg’ on the Welsh version) does not need a separate language attribute because it is in the default language of the page.
Warning flag from ARC Toolkit
The ARC Toolkit browser-based testing tool may warn of a possible failure to meet success criterion 2.5.3 Label in Name (where visible labels need to match, or at least be included in the accessible name of an element). This is because the visible text ‘Cymraeg’ is not included in the accessible name, where it is spelled ‘Gymraeg’. Both spellings are correct because in Welsh the first consonant of a word can change under certain conditions.
We do not currently believe this is an issue for users, but we need more research with Welsh speakers who use voice recognition software. If these users encountered problems we would consider updating this pattern.
Background
The purpose of Label In Name is that voice recognition software users can use visible labels to know what commands to say. Brief testing of this component (by a non-Welsh speaker) found that users of macOS Voice Control and Voice Access on Windows might encounter some problems but that changing the text made little difference and both variations responded to commands. Dragon (on Windows) worked well.
All these user groups would be able to fall back on ‘click link’ commands.
WCAG success criteria
When testing, pay particular attention to the following WCAG success criteria:
For more about building accessible services see the DWP Accessibility Manual.
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: