govuk-design-system icon indicating copy to clipboard operation
govuk-design-system copied to clipboard

Accordion HTML version doesn't state that IDs need to be unique

Open hannalaakso opened this issue 4 years ago • 2 comments

Nunjucks options table for the accordion states this for IDs:

Must be unique across the domain of your service (as the expanded state of individual instances of the component persists across page loads using localStorage).

However if you look at the HTML version this is not stated.

A user ran into an issue where they didn't know the IDs for accordions needed to be unique. I'm raising this retrospectively from the support logs and don't know if they were using the HTML version or macro but the issue could have been the lack of HTML docs.

Wider issue

There might be wider issues around how how we represent the ways of customising the component markup for HTML users as they aren't as clearly signposted as the Nunjucks ones

hannalaakso avatar Oct 30 '19 08:10 hannalaakso

Discussed with team in triage. We've not seen the wider issue come up with users so we'll keep an eye on it. We're going to document the requirement in the guidance.

For context, here is the original discussion about putting the onus on the team implementing this to make the IDs unique across the domain and only documenting this in the options table.

hannalaakso avatar Oct 30 '19 14:10 hannalaakso

This would be solved by https://github.com/alphagov/govuk-design-system/issues/1085

hannalaakso avatar Mar 10 '20 10:03 hannalaakso