Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move focus to content area on skip link activation #2438

Closed
wants to merge 4 commits into from

Conversation

vanitabarrett
Copy link
Contributor

No description provided.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2438 November 22, 2021 16:50 Inactive
When user activates the skip link, Mac VoiceOver currently does not announce the main content or continue reading
from it.

To improve the experience for Mac VoiceOver users:
- make the main content element focusable by adding a `tabindex` attribute
- move focus to it programmatically
- override the native focus outline to none whilst `tabindex` is present
- remove the `tabindex` attribute and the style override on blur

This follows the pattern we already use in the error summary and notification banner components.

There also seems to be an improvement to the announcements on JAWS (both with Chrome and IE11): JAWS now announces it's on the main region, before it starts reading the main content.

Behaviour | Announces skip link when it's navigated to | Announces main has been navigated to | Reads out content of main
-- | -- | -- | --
JAWS 2020 / Chrome | same page link skip to main content | enter **main** region **main** region page has 4 regions and 8 headings `<main content>` | enter **main** region **main** region page has 4 regions and 8 headings `<main content>`
JAWS 2020 / IE 11 | skip to main content same page link | enter **main** region page has 4 regions and 8 headings `<main content>` | enter main region page has 4 regions and 8 headings `<main content>`
NVDA 2021.1/ Firefox 90 | skip to main content link | main landmark  `<main content>` | main landmark  `<main content>`
Voiceover / Safari (macOS Mojave) | skip to main content, link | **main you are currently on a text area** | **`<main content>`**
Voiceover / Safari (iOS 15) | Skip to main content, in-page link | After double-tapping to follow link: "Press release, main landmark" | After double-tapping to follow link: "Press release, main landmark"
Talkback / Chrome 96 (Android 11) | skip to main content, link | After double-tapping to follow link: "main, Press release, <main content>" | After double-tapping to follow link: "main, Press release, <main content>"

(Announcements that have changed from the live version are in **bold** ^)

See #2187 (comment) for more details
Add basic page content and initialise JavaScript for components so that the pages can be used for tests.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2438 November 29, 2021 17:53 Inactive
@hannalaakso
Copy link
Member

Used to generate a preview for the original investigation - closed in favour of #2450

@vanitabarrett vanitabarrett deleted the focus-skip-link-target branch December 21, 2021 13:07
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.

3 participants