Closed sarawilcox closed 1 month ago
@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: https://github.com/nhsuk/nhsuk-service-manual/issues/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!
Update release, Nunjucks macro options added but no further guidance added.
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?