From e4cfebcd0d0408561754c29b8fea5285d062b9c9 Mon Sep 17 00:00:00 2001 From: Hanna Date: Mon, 29 Nov 2021 17:48:48 +0000 Subject: [PATCH] Update Changelog Co-authored-by: Eoin Shaughnessy --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a42b31e83e..d1f3fc2fdf 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 linked element, for example, the main content on the page. This helps screen readers read the linked content when users use 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 linked 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).