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

Contents list: There is no visual differentiation between navigating within a page and across pages #4261

Open
ChristineWuerth opened this issue Sep 26, 2024 · 1 comment

Comments

@ChristineWuerth
Copy link

This is an inconsistency someone raised with us in the process of documenting the contents list component as part of the design documentation work:
In the contents list components we make no visual differentiation between navigating within a page and across pages. Should the same pattern both link to multiple pages, and scroll you down the same page? See what it does on a Whitehall guide vs Mainstream guide.
This could work harder with content, eg “Sections on this page” to differentiate from “Pages in this publication”.

@jon-kirwan
Copy link
Contributor

jon-kirwan commented Sep 27, 2024

Hi @ChristineWuerth, the difference here is that in the Mainstream guide example, the items redirect to a new page, and the styling is applied to the items to reflect the current page when it loads.

In contrast, the Whitehall guide example uses page anchors to navigate to sections within the same page which cannot apply the same styling (because there is no page reload).

That said, it may be possible to highlight the currently selected item using the :target pseudo-class https://developer.mozilla.org/en-US/docs/Web/CSS/:target. Will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants