Skip to content

Focus skip link target to improve screen reader announcements#1173

Merged
colinrotherham merged 5 commits into
mainfrom
visually-hidden-focusable
Apr 7, 2025
Merged

Focus skip link target to improve screen reader announcements#1173
colinrotherham merged 5 commits into
mainfrom
visually-hidden-focusable

Conversation

@colinrotherham
Copy link
Copy Markdown
Contributor

@colinrotherham colinrotherham commented Mar 5, 2025

Description

This PR updates the Skip link to call .focus() on its href="#maincontent" target to follow:

These changes build on top of #1169 and fix:

Visually hidden (focusable)

I've also included:

  1. New Sass mixin visually-hidden-focusable
  2. New CSS class nhsuk-u-visually-hidden-focusable

These were applied to the skip link component

Checklist

@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from a0fe469 to 1164f8c Compare March 5, 2025 19:00
@colinrotherham colinrotherham changed the title Apply visually hidden (focusable) fixes to Skip link component Focus skip link target to improve screen reader announcements Mar 5, 2025
This was linked to issues Mar 5, 2025
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from 1164f8c to 2f5a144 Compare March 6, 2025 13:59
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from 2f5a144 to 8366ac4 Compare March 6, 2025 15:05
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from 8366ac4 to f6a6c4f Compare March 12, 2025 18:22
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from f6a6c4f to 297ae1d Compare March 12, 2025 19:23
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from 297ae1d to 792c0f0 Compare March 18, 2025 16:08
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from 792c0f0 to a5169ab Compare April 3, 2025 17:27
@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch 2 times, most recently from 4140af7 to 0c5ee10 Compare April 4, 2025 09:01
anandamaryon1
anandamaryon1 previously approved these changes Apr 7, 2025
edwardhorsford
edwardhorsford previously approved these changes Apr 7, 2025
Copy link
Copy Markdown
Contributor

@edwardhorsford edwardhorsford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely stuff. Glad to see focussing the h1 fixed.

I was going to suggest updating the layout guidance in the service manual, but it looks like that implied the main ID got used anyway.

@colinrotherham
Copy link
Copy Markdown
Contributor Author

Thanks @edwardhorsford @anandamaryon1

If you can take a look at #1170 too?

That's the one that swaps the visually hidden code over to what GOV.UK Frontend uses

Base automatically changed from visually-hidden to main April 7, 2025 12:20
@colinrotherham colinrotherham dismissed stale reviews from edwardhorsford and anandamaryon1 April 7, 2025 12:20

The base branch was changed.

@colinrotherham colinrotherham force-pushed the visually-hidden-focusable branch from 0c5ee10 to 7c631ad Compare April 7, 2025 12:21
@colinrotherham colinrotherham merged commit e5c6383 into main Apr 7, 2025
10 checks passed
@colinrotherham colinrotherham deleted the visually-hidden-focusable branch April 7, 2025 12:37
colinrotherham added a commit that referenced this pull request Apr 8, 2025
Restores skip link `z-index: 2` from #1173
colinrotherham added a commit that referenced this pull request Apr 10, 2025
Restores skip link `z-index: 2` from #1173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip to main link adds a focus ring to the H1 Skiplink target

3 participants