Closed joelanman closed 5 years ago
As I mentioned in the thread (https://github.com/alphagov/govuk-design-system-backlog/issues/182#issuecomment-453187133), we decided to do this so that you could compare lists with a single item on one row with another row, which may have multiple actions.
Semantically it is correct, and tested well in assistive technologies.
https://www.w3.org/TR/html52/grouping-content.html#the-ul-element
Zero or more li and script-supporting elements.
The point about there only being one action most of the time seems fair given that this component is featured in the check your answers pattern so this seems worth doing.
The primary use case for summary list is Check Answers, which has one action - 'Change'
In the markup, this is wrapped in a list (ul, li), to allow for multiple actions. However in the case of one action, this is arguably not semantically correct, and makes the markup more complicated than it needs to be.
Can we avoid a list when there's only one action?