diff --git a/CHANGELOG.md b/CHANGELOG.md index a42b31e83e..66be72a3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,24 @@ If you see unexpected behaviour, make sure the `id` for the textarea is unique This change was introduced in [pull request #2408: Prevent issues with character count when textarea `id` includes CSS syntax characters](https://github.com/alphagov/govuk-frontend/pull/2408). +#### Include JavaScript for skip link to improve screen reader announcements + +We've added JavaScript for the skip link component to set focus to the target element, for example, the main content on the page. This helps screen readers read the main content when users activate the skip link. + +If you're not using Nunjucks macros, add a `data-module="govuk-skip-link"` attribute to the component HTML. For example: + +```html + +``` + +If you're [importing JavaScript for individual components](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#select-and-initialise-an-individual-component), import the skip link JavaScript. + +Once you've made the changes, check that the skip link JavaScript works. To make sure, click the skip link and check that the target element (usually the `
` element) in the browser has a `tabindex` attribute. + +This change was introduced in [pull request #2450: Set focus to skip link target to improve screen reader announcements](https://github.com/alphagov/govuk-frontend/pull/2450). + #### Remove calls to deprecated `iff` Sass function We've removed the `iff` function which we deprecated in [GOV.UK Frontend version 3.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v3.6.0).