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

Skip link not working on About pages #4408

Open
MartinJJones opened this issue Nov 18, 2024 · 3 comments
Open

Skip link not working on About pages #4408

MartinJJones opened this issue Nov 18, 2024 · 3 comments

Comments

@MartinJJones
Copy link
Contributor

What

The skip link does not allow you to skip to the main content on the /help pages, with the exception of /help/cookies

The JavaScript error below is thrown in the console:

Error starting GovukSkipLink component JS
ElementError: govuk-skip-link
Target content (`id="content"`) not found

Possible fix

We should be able to fix this by adding <main id="content"> to the _body_with_related_links.html.erb view template, similar to the approach used in _base_page.html.erb

@andysellick
Copy link
Contributor

Good spot @MartinJJones. I think this might relate to some of recent app consolidation work, going to ping @KludgeKML to check.

@KludgeKML
Copy link
Contributor

Yes, that's correct - when the help pages got moved over (they were the first set to be moved), we didn't notice that government-frontend pages all had an implicit main element in the layout, but frontend pages all supplied their own main element. I'll write up a card to get this added.

@MartinJJones
Copy link
Contributor Author

Thanks @andysellick @KludgeKML 👍

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

No branches or pull requests

3 participants