alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.16k stars 319 forks source link

Research any use cases for non phrasing content inside accordion summary line #2309

Closed hannalaakso closed 3 years ago

hannalaakso commented 3 years ago

What

As part of the new accordion iteration, we're

We move the summary for design purposes:

We’ve decided to move the summary in order to better visually illustrate the additional context of accordion heading by placing it directly beneath the heading as opposed to placing it directly beneath the reveal/expand button

From https://github.com/alphagov/govuk-frontend/pull/2257/commits/42e80d9f3dc6024df8616aabf8a7bf1e17ede950

However, this restricts what elements the summary can contain as buttons can only contain phrasing content.

We plan to update our docs to reflect this change and also make it clear in the release note of the breaking release 4.0 that in the new design the heading/summary should explain the content of the section, and using block level elements in this context probably isn't appropriate or necessary.

Why

This feels like an edge case and low risk but we should do a bit of research to see if there are any known use cases of elements other than phrasing content being hosted inside accordion summaries.

Further detail

We don't have any evidence that services need to include any elements other than phrasing content inside of the summary line. In any such cases, it’s likely that the team are not using the accordion as intended (and as part of this design iteration we’re looking to make the guidance explain more clearly that accordions should be used as last resort - see https://github.com/alphagov/govuk-design-system/issues/1684 for more info) and that the new more button like design of the section headings would be harder to understand if the summary spanned multiple lines.

Who needs to know about this

Developers

Done when

hannalaakso commented 3 years ago

Update

Findings from scouring GitHub