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

Draft guidance on support classes and attributes in header primary links #1994

Closed
sarawilcox opened this issue Jul 8, 2024 · 2 comments
Closed
Assignees
Labels

Comments

@sarawilcox
Copy link
Contributor

We will need some guidance on the design system header component if we support classes and attributes in header primary links in the frontend. See Support classes and attributes in header primary links #978(.

For example, noting that highlighting current section can help users identify where they are on the site or in transactional journey.
We might mention that it may not work on very big websites, like the NHS website, where people have long and complex journeys across sections - and into areas of the site not covered in the top nav links.

@frankieroberto, if you have any suggestions for guidance, would you mind noting it here, please? Also @anandamaryon1?

@sarawilcox sarawilcox self-assigned this Jul 8, 2024
@frankieroberto
Copy link
Contributor

@sarawilcox I was imagining that the only documentation for classes and attributes on primaryLinks would be adding those to the Nunjucks macro, which I’ve drafted here: #1994 – I don’t think those options are mentioned in the guidance for any other components, although I could be wrong?

We could mention some of the possible use cases, such as highlighting the current section, but that might be quite tricky as none of those styles would be included, and so users would also have to add some custom CSS.

I was planning a follow-up proposal to add support for 'current section' as more of a first-class feature, which would probably use another param like "current": true, and then wouldn’t need any use of custom attributes or classes or css. That would definitely need some good documentation though!

@anandamaryon1
Copy link
Contributor

Update release, Nunjucks macro options added but no further guidance added.

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

No branches or pull requests

3 participants