-
Notifications
You must be signed in to change notification settings - Fork 242
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
Prototype for making it easier to link to specific sections by headings #1004
Conversation
Allows for easy linking to sections
Anchors are spaced better
You can preview this change here: Built with commit 96b89ed https://deploy-preview-1004--govuk-design-system-preview.netlify.com |
</td> | ||
</tr> | ||
{% endfor %} | ||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be flattened so the HTML doesnt get confused, not sure another way.
If people like this approach I can tidy up the code and get it ready for review. |
I talked to @DebsDee and we want to explore being more consistent with the H2 side navigation before doing something like this as we're concerned about the accessibility impact. |
I'm opening this as a result of my messing around with different approaches.
The main controversial aspect of this approach is that it's intentionally pointer (desktop mouse) only.
You cannot keyboard navigate to the headings.
This is because I felt it would be noisy to duplicate the headings with links.
On pages such as typography you'd also get headings and the sub navigation with the same URL.
If you're looking to navigate to a heading in assistive technologies you could already use the overview for headings and headings shortcuts, so it feels like adding these additionally as links is extra noise.
I'm not sure if this is the right decision which is why I'm opening this as a prototype for discussion.
Features
Screenshots
Closes #425